平安校园
 
 
 
 
 
 

384 lines
12 KiB

  1. namespace SafeCampus.System;
  2. /// <summary>
  3. /// 用户信息表
  4. ///</summary>
  5. [SugarTable("sys_user", TableDescription = "用户信息表")]
  6. [Tenant(SqlSugarConst.DB_DEFAULT)]
  7. [BatchEdit]
  8. [CodeGen]
  9. public class SysUser : BaseEntity
  10. {
  11. /// <summary>
  12. /// 头像
  13. ///</summary>
  14. [SugarColumn(ColumnName = "Avatar", ColumnDescription = "头像", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
  15. public virtual string Avatar { get; set; }
  16. /// <summary>
  17. /// 签名
  18. ///</summary>
  19. [SugarColumn(ColumnName = "Signature", ColumnDescription = "签名", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
  20. public string Signature { get; set; }
  21. /// <summary>
  22. /// 账号
  23. ///</summary>
  24. [SugarColumn(ColumnName = "Account", ColumnDescription = "账号", Length = 200, IsNullable = false)]
  25. public virtual string Account { get; set; }
  26. /// <summary>
  27. /// 密码
  28. ///</summary>
  29. [SugarColumn(ColumnName = "Password", ColumnDescription = "密码", Length = 200, IsNullable = false)]
  30. public string Password { get; set; }
  31. /// <summary>
  32. /// 姓名
  33. ///</summary>
  34. [SugarColumn(ColumnName = "Name", ColumnDescription = "姓名", Length = 200, IsNullable = true)]
  35. public virtual string Name { get; set; }
  36. /// <summary>
  37. /// 昵称
  38. ///</summary>
  39. [SugarColumn(ColumnName = "Nickname", ColumnDescription = "昵称", Length = 200, IsNullable = true)]
  40. public string Nickname { get; set; }
  41. /// <summary>
  42. /// 性别
  43. ///</summary>
  44. [SugarColumn(ColumnName = "Gender", ColumnDescription = "性别", Length = 200, IsNullable = true)]
  45. public string Gender { get; set; }
  46. /// <summary>
  47. /// 出生日期
  48. ///</summary>
  49. [SugarColumn(ColumnName = "Birthday", ColumnDescription = "出生日期", Length = 200, IsNullable = true)]
  50. public string Birthday { get; set; }
  51. /// <summary>
  52. /// 民族
  53. ///</summary>
  54. [SugarColumn(ColumnName = "Nation", ColumnDescription = "民族", Length = 200, IsNullable = true)]
  55. public string Nation { get; set; }
  56. /// <summary>
  57. /// 籍贯
  58. ///</summary>
  59. [SugarColumn(ColumnName = "NativePlace", ColumnDescription = "籍贯", Length = 200, IsNullable = true)]
  60. public string NativePlace { get; set; }
  61. /// <summary>
  62. /// 家庭住址
  63. ///</summary>
  64. [SugarColumn(ColumnName = "HomeAddress", ColumnDescription = "家庭住址", IsNullable = true)]
  65. public string HomeAddress { get; set; }
  66. /// <summary>
  67. /// 通信地址
  68. ///</summary>
  69. [SugarColumn(ColumnName = "MailingAddress", ColumnDescription = "通信地址", IsNullable = true)]
  70. public string MailingAddress { get; set; }
  71. /// <summary>
  72. /// 证件类型
  73. ///</summary>
  74. [SugarColumn(ColumnName = "IdCardType", ColumnDescription = "证件类型", Length = 200, IsNullable = true)]
  75. public string IdCardType { get; set; }
  76. /// <summary>
  77. /// 证件号码
  78. ///</summary>
  79. [SugarColumn(ColumnName = "IdCardNumber", ColumnDescription = "证件号码", Length = 200, IsNullable = true)]
  80. public string IdCardNumber { get; set; }
  81. /// <summary>
  82. /// 文化程度
  83. ///</summary>
  84. [SugarColumn(ColumnName = "CultureLevel", ColumnDescription = "文化程度", Length = 200, IsNullable = true)]
  85. public string CultureLevel { get; set; }
  86. /// <summary>
  87. /// 政治面貌
  88. ///</summary>
  89. [SugarColumn(ColumnName = "PoliticalOutlook", ColumnDescription = "政治面貌", Length = 200, IsNullable = true)]
  90. public string PoliticalOutlook { get; set; }
  91. /// <summary>
  92. /// 毕业院校
  93. ///</summary>
  94. [SugarColumn(ColumnName = "College", ColumnDescription = "毕业院校", Length = 200, IsNullable = true)]
  95. public string College { get; set; }
  96. /// <summary>
  97. /// 学历
  98. ///</summary>
  99. [SugarColumn(ColumnName = "Education", ColumnDescription = "学历", Length = 200, IsNullable = true)]
  100. public string Education { get; set; }
  101. /// <summary>
  102. /// 学制
  103. ///</summary>
  104. [SugarColumn(ColumnName = "EduLength", ColumnDescription = "学制", Length = 200, IsNullable = true)]
  105. public string EduLength { get; set; }
  106. /// <summary>
  107. /// 学位
  108. ///</summary>
  109. [SugarColumn(ColumnName = "Degree", ColumnDescription = "学位", Length = 200, IsNullable = true)]
  110. public string Degree { get; set; }
  111. /// <summary>
  112. /// 手机
  113. /// 这里使用了SM4自动加密解密
  114. ///</summary>
  115. [SugarColumn(ColumnName = "Phone", ColumnDescription = "手机", Length = 200, IsNullable = true)]
  116. public string Phone { get; set; }
  117. /// <summary>
  118. /// 邮箱
  119. ///</summary>
  120. [SugarColumn(ColumnName = "Email", ColumnDescription = "邮箱", Length = 200, IsNullable = true)]
  121. public string Email { get; set; }
  122. /// <summary>
  123. /// 家庭电话
  124. ///</summary>
  125. [SugarColumn(ColumnName = "HomeTel", ColumnDescription = "家庭电话", Length = 200, IsNullable = true)]
  126. public string HomeTel { get; set; }
  127. /// <summary>
  128. /// 办公电话
  129. ///</summary>
  130. [SugarColumn(ColumnName = "OfficeTel", ColumnDescription = "办公电话", Length = 200, IsNullable = true)]
  131. public string OfficeTel { get; set; }
  132. /// <summary>
  133. /// 紧急联系人
  134. ///</summary>
  135. [SugarColumn(ColumnName = "EmergencyContact", ColumnDescription = "紧急联系人", Length = 200, IsNullable = true)]
  136. public string EmergencyContact { get; set; }
  137. /// <summary>
  138. /// 紧急联系人电话
  139. ///</summary>
  140. [SugarColumn(ColumnName = "EmergencyPhone", ColumnDescription = "紧急联系人电话", Length = 200, IsNullable = true)]
  141. public string EmergencyPhone { get; set; }
  142. /// <summary>
  143. /// 紧急联系人地址
  144. ///</summary>
  145. [SugarColumn(ColumnName = "EmergencyAddress", ColumnDescription = "紧急联系人地址", IsNullable = true)]
  146. public string EmergencyAddress { get; set; }
  147. /// <summary>
  148. /// 员工编号
  149. ///</summary>
  150. [SugarColumn(ColumnName = "EmpNo", ColumnDescription = "员工编号", Length = 200, IsNullable = true)]
  151. public string EmpNo { get; set; }
  152. /// <summary>
  153. /// 入职日期
  154. ///</summary>
  155. [SugarColumn(ColumnName = "EntryDate", ColumnDescription = "入职日期", Length = 200, IsNullable = true)]
  156. public string EntryDate { get; set; }
  157. /// <summary>
  158. /// 机构id
  159. ///</summary>
  160. [SugarColumn(ColumnName = "OrgId", ColumnDescription = "机构id", IsNullable = false)]
  161. public virtual long OrgId { get; set; }
  162. /// <summary>
  163. /// 职位id
  164. ///</summary>
  165. [SugarColumn(ColumnName = "PositionId", ColumnDescription = "职位id", IsNullable = false)]
  166. public virtual long PositionId { get; set; }
  167. /// <summary>
  168. /// 职级
  169. ///</summary>
  170. [SugarColumn(ColumnName = "PositionLevel", ColumnDescription = "职级", Length = 200, IsNullable = true)]
  171. public string PositionLevel { get; set; }
  172. /// <summary>
  173. /// 主管id
  174. ///</summary>
  175. [SugarColumn(ColumnName = "DirectorId", ColumnDescription = "主管id", IsNullable = true)]
  176. public long? DirectorId { get; set; }
  177. /// <summary>
  178. /// 上次修改密码时间
  179. ///</summary>
  180. [SugarColumn(ColumnName = "PwdRemindUpdateTime", ColumnDescription = "密码提醒修改时间", IsNullable = true)]
  181. public DateTime? PwdRemindUpdateTime { get; set; }
  182. /// <summary>
  183. /// 上次登录ip
  184. ///</summary>
  185. [SugarColumn(ColumnName = "LastLoginIp", ColumnDescription = "上次登录ip", Length = 200, IsNullable = true)]
  186. public string LastLoginIp { get; set; }
  187. /// <summary>
  188. /// 上次登录地点
  189. ///</summary>
  190. [SugarColumn(ColumnName = "LastLoginAddress", ColumnDescription = "上次登录地点", Length = 200, IsNullable = true)]
  191. public string LastLoginAddress { get; set; }
  192. /// <summary>
  193. /// 上次登录时间
  194. ///</summary>
  195. [SugarColumn(ColumnName = "LastLoginTime", ColumnDescription = "上次登录时间", IsNullable = true)]
  196. public DateTime? LastLoginTime { get; set; }
  197. /// <summary>
  198. /// 上次登录设备
  199. ///</summary>
  200. [SugarColumn(ColumnName = "LastLoginDevice", ColumnDescription = "上次登录设备", IsNullable = true)]
  201. public string LastLoginDevice { get; set; }
  202. /// <summary>
  203. /// 最新登录ip
  204. ///</summary>
  205. [SugarColumn(ColumnName = "LatestLoginIp", ColumnDescription = "最新登录ip", Length = 200, IsNullable = true)]
  206. public string LatestLoginIp { get; set; }
  207. /// <summary>
  208. /// 最新登录地点
  209. ///</summary>
  210. [SugarColumn(ColumnName = "LatestLoginAddress", ColumnDescription = "最新登录地点", Length = 200, IsNullable = true)]
  211. public string LatestLoginAddress { get; set; }
  212. /// <summary>
  213. /// 最新登录时间
  214. ///</summary>
  215. [SugarColumn(ColumnName = "LatestLoginTime", ColumnDescription = "最新登录时间", IsNullable = true)]
  216. public DateTime? LatestLoginTime { get; set; }
  217. /// <summary>
  218. /// 最新登录设备
  219. ///</summary>
  220. [SugarColumn(ColumnName = "LatestLoginDevice", ColumnDescription = "最新登录设备", IsNullable = true)]
  221. public string LatestLoginDevice { get; set; }
  222. /// <summary>
  223. /// 排序码
  224. ///</summary>
  225. [SugarColumn(ColumnName = "SortCode", ColumnDescription = "排序码", IsNullable = true)]
  226. public int? SortCode { get; set; }
  227. /// <summary>
  228. /// 默认模块
  229. ///</summary>
  230. [SugarColumn(ColumnName = "DefaultModule", ColumnDescription = "默认模块", IsNullable = true)]
  231. public long? DefaultModule { get; set; }
  232. /// <summary>
  233. /// 机构信息
  234. /// </summary>
  235. [SugarColumn(IsIgnore = true)]
  236. public string OrgName { get; set; }
  237. /// <summary>
  238. /// 机构信息全称
  239. /// </summary>
  240. [SugarColumn(IsIgnore = true)]
  241. public string OrgNames { get; set; }
  242. /// <summary>
  243. /// 职位信息
  244. /// </summary>
  245. [SugarColumn(IsIgnore = true)]
  246. public string PositionName { get; set; }
  247. /// <summary>
  248. /// 组织和机构ID列表,组织ID从上到下最后是职位
  249. /// </summary>
  250. [SugarColumn(IsIgnore = true, IsJson = true)]
  251. public List<long> OrgAndPosIdList { get; set; } = new List<long>();
  252. /// <summary>
  253. /// 主管信息
  254. /// </summary>
  255. [SugarColumn(IsIgnore = true)]
  256. public UserSelectorOutPut DirectorInfo { get; set; }
  257. /// <summary>
  258. /// 按钮码集合
  259. /// </summary>
  260. [SugarColumn(IsIgnore = true)]
  261. public List<string> ButtonCodeList { get; set; }
  262. /// <summary>
  263. /// 权限码集合
  264. /// </summary>
  265. [SugarColumn(IsIgnore = true)]
  266. public List<string> PermissionCodeList { get; set; }
  267. /// <summary>
  268. /// 角色码集合
  269. /// </summary>
  270. [SugarColumn(IsIgnore = true)]
  271. public List<string> RoleCodeList { get; set; }
  272. /// <summary>
  273. /// 角色ID集合
  274. /// </summary>
  275. [SugarColumn(IsIgnore = true)]
  276. public List<long> RoleIdList { get; set; }
  277. /// <summary>
  278. /// 数据范围集合
  279. /// </summary>
  280. [SugarColumn(IsIgnore = true)]
  281. public List<DataScope> DataScopeList { get; set; }
  282. /// <summary>
  283. /// 默认数据范围
  284. /// </summary>
  285. [SugarColumn(IsIgnore = true)]
  286. public DefaultDataScope DefaultDataScope { get; set; }
  287. /// <summary>
  288. /// 机构及以下机构ID集合
  289. /// </summary>
  290. [SugarColumn(IsIgnore = true)]
  291. public List<long> ScopeOrgChildList { get; set; }
  292. /// <summary>
  293. /// 机构及以下机构ID集合
  294. /// </summary>
  295. [SugarColumn(IsIgnore = true)]
  296. public List<SysResource> ModuleList { get; set; } = new List<SysResource>();
  297. /// <summary>
  298. /// 租户Id
  299. /// </summary>
  300. [SugarColumn(IsIgnore = true)]
  301. public long? TenantId { get; set; }
  302. }
  303. /// <summary>
  304. /// 数据范围类
  305. /// </summary>
  306. public class DataScope
  307. {
  308. /// <summary>
  309. /// API接口
  310. /// </summary>
  311. public string ApiUrl { get; set; }
  312. /// <summary>
  313. /// 数据范围分类
  314. /// </summary>
  315. public string ScopeCategory { get; set; }
  316. /// <summary>
  317. /// 数据范围的机构ID列表
  318. /// </summary>
  319. public List<long>? DataScopes { get; set; }
  320. }