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

331 lines
7.3 KiB

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