using SqlSugar; namespace Model.Entity.System { /// /// 用户表 /// [SugarTable("sys_user")] public class UserEntity : BaseEntity { [SugarColumn(ColumnName = "UserName", ColumnDescription = "用户名(登录账号)", Length = 64, IsNullable = false)] public string UserName { get; set; } [SugarColumn(ColumnName = "PasswordHash", ColumnDescription = "密码哈希", Length = 256, IsNullable = false)] public string PasswordHash { get; set; } [SugarColumn(ColumnName = "RealName", ColumnDescription = "真实姓名", Length = 100, IsNullable = true)] public string? RealName { get; set; } [SugarColumn(ColumnName = "Email", ColumnDescription = "邮箱", Length = 128, IsNullable = true)] public string? Email { get; set; } [SugarColumn(ColumnName = "Phone", ColumnDescription = "手机号", Length = 20, IsNullable = true)] public string? Phone { get; set; } [SugarColumn(ColumnName = "OrgId", ColumnDescription = "所属组织Id(公司/实验室/部门/班组任一节点,0=未分配)", DefaultValue = "0")] public long OrgId { get; set; } [SugarColumn(ColumnName = "Position", ColumnDescription = "岗位", Length = 64, IsNullable = true)] public string? Position { get; set; } [SugarColumn(ColumnName = "SkillTags", ColumnDescription = "技能标签(逗号分隔,如 Modbus,PLC,温度箱)", Length = 500, IsNullable = true)] public string? SkillTags { get; set; } [SugarColumn(ColumnName = "IsEnabled", ColumnDescription = "是否启用", ColumnDataType = "smallint", DefaultValue = "1")] public byte IsEnabled { get; set; } [SugarColumn(ColumnName = "LastLoginTime", ColumnDescription = "最后登录时间", IsNullable = true)] public DateTime? LastLoginTime { get; set; } [SugarColumn(ColumnName = "Avatar", ColumnDescription = "头像URL", Length = 256, IsNullable = true)] public string? Avatar { get; set; } [SugarColumn(ColumnName = "Remark", ColumnDescription = "备注", Length = 500, IsNullable = true)] public string? Remark { get; set; } } }