This commit is contained in:
2025-04-16 08:52:53 +08:00
parent 72b67b6a2f
commit 28e15a556d
17 changed files with 965 additions and 294 deletions

View File

@ -1,63 +0,0 @@
using SqlSugar;
namespace DHSoftware.Models
{
[SugarTable("User")]
public class User
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
[SugarColumn(Length = 50, IsNullable = false)]
public string UserName { get; set; }
[SugarColumn(Length = 100, IsNullable = false)]
public string Password { get; set; }
[SugarColumn(IsNullable = true)]
public DateTime? LastLoginTime { get; set; }
}
[SugarTable("Role")]
public class Role
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
[SugarColumn(Length = 50, IsNullable = false)]
public string RoleName { get; set; }
[SugarColumn(Length = 200)]
public string Description { get; set; }
}
[SugarTable("Permission")]
public class Permission
{
[SugarColumn(IsPrimaryKey = true, Length = 50)]
public string Code { get; set; }
[SugarColumn(Length = 100, IsNullable = false)]
public string Name { get; set; }
}
[SugarTable("UserRole")]
public class UserRole
{
[SugarColumn(IsPrimaryKey = true)]
public int UserId { get; set; }
[SugarColumn(IsPrimaryKey = true)]
public int RoleId { get; set; }
}
[SugarTable("RolePermission")]
public class RolePermission
{
[SugarColumn(IsPrimaryKey = true)]
public int RoleId { get; set; }
[SugarColumn(IsPrimaryKey = true)]
public string PermissionCode { get; set; }
}
}