using TakeoutSaaS.Domain.Identity.Entities; namespace TakeoutSaaS.Domain.Identity.Repositories; /// /// 后台用户仓储契约。 /// public interface IIdentityUserRepository { /// /// 根据账号获取后台用户。 /// /// 账号。 /// 取消标记。 /// 后台用户或 null。 Task FindByAccountAsync(string account, CancellationToken cancellationToken = default); /// /// 根据 ID 获取后台用户。 /// /// 用户 ID。 /// 取消标记。 /// 后台用户或 null。 Task FindByIdAsync(long userId, CancellationToken cancellationToken = default); /// /// 按租户与关键字查询后台用户列表(仅读)。 /// /// 租户 ID。 /// 可选关键字(账号/名称)。 /// 取消标记。 /// 后台用户列表。 Task> SearchAsync(long tenantId, string? keyword, CancellationToken cancellationToken = default); /// /// 获取指定租户、用户集合对应的用户(只读)。 /// /// 租户 ID。 /// 用户 ID 集合。 /// 取消标记。 /// 后台用户列表。 Task> GetByIdsAsync(long tenantId, IEnumerable userIds, CancellationToken cancellationToken = default); }