first commit

This commit is contained in:
yanpeng200212
2026-10-08 10:43:59 +08:00
commit 8430ba0452
288 changed files with 29595 additions and 0 deletions
@@ -0,0 +1,14 @@
using F9WebAiTest.Domain.Entities.SYS.RBAC;
namespace F9WebAiTest.Domain.Interfaces.SYS.RBAC.Users;
/// <summary>
/// 用户角色关联写仓储:不把 AssignRole 放在 IUserWriteRepository(避免污染聚合仓储),
/// 而是定义独立的细粒度接口,应用层依赖此抽象,基础设施层实现。
/// </summary>
public interface IUserRoleWriteRepository : IDInterface
{
Task<bool> AssignAsync(UserRole userRole);
Task<bool> RemoveAsync(long userid, long roleId);
}
@@ -0,0 +1,18 @@
using F9WebAiTest.Domain.Entities.SYS.RBAC;
namespace F9WebAiTest.Domain.Interfaces.SYS.RBAC.Users;
/// <summary>用户写仓储(聚合根仓储)</summary>
public interface IUserWriteRepository : IDInterface
{
/// <summary>返回聚合根</summary>
Task<User> GetByIdAsync(long id);
Task<bool> AddAsync(User user);
Task<bool> UpdateAsync(User user);
Task<bool> SoftDeleteAsync(long id);
Task<bool> ActiveOrDeactive(long id, bool active);
Task<bool> UpdatePassworkdAsync(long id, string passwordHash);
Task<bool> UpdateLastLoginAtAsync(long id, DateTime dt);
}