<?php

declare(strict_types=1);

namespace Australcode\Rewards\Domain\Wallet;

/**
 * Persistence for the denormalized per-user balance. Implementation in
 * Infrastructure/Wallet keeps the domain testable without a real $wpdb.
 */
interface BalanceRepository {

	/**
	 * Returns an empty balance (zeros) if the user has no row yet.
	 */
	public function find( int $user_id ): Balance;

	public function save( Balance $balance ): void;
}
