平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

UserInput.cs 7.3 KiB

1 month ago
4 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. namespace SafeCampus.System;
  2. /// <summary>
  3. /// 用户选择器参数
  4. /// </summary>
  5. public class UserSelectorInput : BasePageInput
  6. {
  7. /// <summary>
  8. /// 组织ID
  9. /// </summary>
  10. public long OrgId { get; set; }
  11. /// <summary>
  12. /// 机构ID列表
  13. /// </summary>
  14. public List<long> OrgIds { get; set; }
  15. /// <summary>
  16. /// 机构ID
  17. /// </summary>
  18. public long PositionId { get; set; }
  19. /// <summary>
  20. /// 角色ID
  21. /// </summary>
  22. public long RoleId { get; set; }
  23. /// <summary>
  24. /// 关键字
  25. /// </summary>
  26. public string Account { get; set; }
  27. }
  28. /// <summary>
  29. /// 用户分页查询参数
  30. /// </summary>
  31. public class UserPageInput : BasePageInput
  32. {
  33. /// <summary>
  34. /// 所属组织
  35. /// </summary>
  36. public long OrgId { get; set; }
  37. /// <summary>
  38. /// 动态查询条件
  39. /// </summary>
  40. public Expressionable<SysUser> Expression { get; set; }
  41. /// <summary>
  42. /// 用户状态
  43. /// </summary>
  44. public string Status { get; set; }
  45. }
  46. /// <summary>
  47. /// 添加用户参数
  48. /// </summary>
  49. public class UserAddInput : SysUser
  50. {
  51. /// <summary>
  52. /// 账号
  53. /// </summary>
  54. [Required(ErrorMessage = "Account不能为空")]
  55. public override string Account { get; set; }
  56. /// <summary>
  57. /// 姓名
  58. /// </summary>
  59. [Required(ErrorMessage = "Name不能为空")]
  60. public override string Name { get; set; }
  61. /// <summary>
  62. /// 组织id
  63. /// </summary>
  64. [IdNotNull(ErrorMessage = "OrgId不能为空")]
  65. public override long OrgId { get; set; }
  66. /// <summary>
  67. /// 职位id
  68. /// </summary>
  69. [IdNotNull(ErrorMessage = "PositionId不能为空")]
  70. public override long PositionId { get; set; }
  71. }
  72. /// <summary>
  73. /// 编辑用户参数
  74. /// </summary>
  75. public class UserEditInput : UserAddInput
  76. {
  77. /// <summary>
  78. /// Id
  79. /// </summary>
  80. [IdNotNull(ErrorMessage = "Id不能为空")]
  81. public override long Id { get; set; }
  82. }
  83. /// <summary>
  84. /// 用户授权角色参数
  85. /// </summary>
  86. public class UserGrantRoleInput
  87. {
  88. /// <summary>
  89. /// Id
  90. /// </summary>
  91. [IdNotNull(ErrorMessage = "Id不能为空")]
  92. public long Id { get; set; }
  93. /// <summary>
  94. /// 授权权限信息
  95. /// </summary>
  96. [Required(ErrorMessage = "RoleIdList不能为空")]
  97. public List<long> RoleIdList { get; set; }
  98. }
  99. public class UserGrantResourceInput : GrantResourceInput
  100. {
  101. /// <summary>
  102. /// 默认数据权限
  103. /// </summary>
  104. [Required(ErrorMessage = "DefaultDataScope不能为空")]
  105. public DefaultDataScope DefaultDataScope { get; set; }
  106. }
  107. /// <summary>
  108. /// 用户导入
  109. /// </summary>
  110. public class SysUserImportInput : ImportTemplateInput
  111. {
  112. /// <summary>
  113. /// 账号
  114. /// </summary>
  115. [ImporterHeader(Name = "账号")]
  116. [Required(ErrorMessage = "账号不能为空")]
  117. public string Account { get; set; }
  118. /// <summary>
  119. /// 姓名
  120. ///</summary>
  121. [ImporterHeader(Name = "姓名")]
  122. [Required(ErrorMessage = "姓名不能为空")]
  123. public virtual string Name { get; set; }
  124. /// <summary>
  125. /// 性别
  126. ///</summary>
  127. [ImporterHeader(Name = "性别")]
  128. [Required(ErrorMessage = "性别不能为空")]
  129. public string Gender { get; set; }
  130. /// <summary>
  131. /// 昵称
  132. ///</summary>
  133. [ImporterHeader(Name = "昵称")]
  134. public string Nickname { get; set; }
  135. /// <summary>
  136. /// 手机
  137. /// 这里使用了SM4自动加密解密
  138. ///</summary>
  139. [ImporterHeader(Name = "手机号")]
  140. public string Phone { get; set; }
  141. /// <summary>
  142. /// 邮箱
  143. ///</summary>
  144. [ImporterHeader(Name = "邮箱")]
  145. [EmailAddress(ErrorMessage = "邮箱格式错误")]
  146. public string Email { get; set; }
  147. /// <summary>
  148. /// 所属机构
  149. /// </summary>
  150. [ImporterHeader(Name = "所属机构(子机构用/隔开)")]
  151. [Required(ErrorMessage = "所属部门不能为空")]
  152. [AntTable(Width = 200)]
  153. public string OrgName { get; set; }
  154. /// <summary>
  155. /// 职位
  156. /// </summary>
  157. [ImporterHeader(Name = "职位")]
  158. [Required(ErrorMessage = "职位不能为空")]
  159. public string PositionName { get; set; }
  160. /// <summary>
  161. /// 出生日期
  162. ///</summary>
  163. [ImporterHeader(Name = "出生日期")]
  164. [AntTable(IsDate = true)]
  165. public DateTime? Birthday { get; set; }
  166. /// <summary>
  167. /// 民族
  168. ///</summary>
  169. [ImporterHeader(Name = "民族")]
  170. public string Nation { get; set; }
  171. /// <summary>
  172. /// 籍贯
  173. ///</summary>
  174. [ImporterHeader(Name = "籍贯")]
  175. public string NativePlace { get; set; }
  176. /// <summary>
  177. /// 家庭住址
  178. ///</summary>
  179. [ImporterHeader(Name = "家庭住址")]
  180. public string HomeAddress { get; set; }
  181. /// <summary>
  182. /// 通信地址
  183. ///</summary>
  184. [ImporterHeader(Name = "通信地址")]
  185. public string MailingAddress { get; set; }
  186. /// <summary>
  187. /// 证件类型
  188. ///</summary>
  189. [ImporterHeader(Name = "证件类型")]
  190. public string IdCardType { get; set; }
  191. /// <summary>
  192. /// 证件号码
  193. ///</summary>
  194. [ImporterHeader(Name = "证件号码")]
  195. public string IdCardNumber { get; set; }
  196. /// <summary>
  197. /// 文化程度
  198. ///</summary>
  199. [ImporterHeader(Name = "文化程度")]
  200. public string CultureLevel { get; set; }
  201. /// <summary>
  202. /// 政治面貌
  203. ///</summary>
  204. [ImporterHeader(Name = "政治面貌")]
  205. public string PoliticalOutlook { get; set; }
  206. /// <summary>
  207. /// 毕业院校
  208. ///</summary>
  209. [ImporterHeader(Name = "毕业院校")]
  210. public string College { get; set; }
  211. /// <summary>
  212. /// 学历
  213. ///</summary>
  214. [ImporterHeader(Name = "学历")]
  215. public string Education { get; set; }
  216. /// <summary>
  217. /// 学制
  218. ///</summary>
  219. [ImporterHeader(Name = "学制")]
  220. public string EduLength { get; set; }
  221. /// <summary>
  222. /// 学位
  223. ///</summary>
  224. [ImporterHeader(Name = "学位")]
  225. public string Degree { get; set; }
  226. /// <summary>
  227. /// 家庭电话
  228. ///</summary>
  229. [ImporterHeader(Name = "家庭电话")]
  230. public string HomeTel { get; set; }
  231. /// <summary>
  232. /// 办公电话
  233. ///</summary>
  234. [ImporterHeader(Name = "办公电话")]
  235. public string OfficeTel { get; set; }
  236. /// <summary>
  237. /// 紧急联系人
  238. ///</summary>
  239. [ImporterHeader(Name = "紧急联系人")]
  240. public string EmergencyContact { get; set; }
  241. /// <summary>
  242. /// 紧急联系人电话
  243. ///</summary>
  244. [ImporterHeader(Name = "紧急联系人电话")]
  245. [Phone(ErrorMessage = "电话号码格式错误")]
  246. public string EmergencyPhone { get; set; }
  247. /// <summary>
  248. /// 紧急联系人地址
  249. ///</summary>
  250. [ImporterHeader(Name = "紧急联系人地址")]
  251. public string EmergencyAddress { get; set; }
  252. /// <summary>
  253. /// 员工编号
  254. ///</summary>
  255. [ImporterHeader(Name = "员工编号")]
  256. public string EmpNo { get; set; }
  257. /// <summary>
  258. /// 入职日期
  259. ///</summary>
  260. [ImporterHeader(Name = "入职日期")]
  261. [AntTable(IsDate = true)]
  262. public DateTime? EntryDate { get; set; }
  263. /// <summary>
  264. /// 部门Id
  265. /// </summary>
  266. [ImporterHeader(IsIgnore = true)]
  267. public long OrgId { get; set; }
  268. /// <summary>
  269. /// 职位Id
  270. /// </summary>
  271. [ImporterHeader(IsIgnore = true)]
  272. public long PositionId { get; set; }
  273. }