平安校园
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

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