UserDto.cs 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Text.RegularExpressions;
  6. using System.Threading.Tasks;
  7. namespace OASystem.Domain.Dtos.System
  8. {
  9. /// <summary>
  10. /// 员工表查询dto
  11. /// </summary>
  12. public class UserDto : DtoBase
  13. {
  14. /// <summary>
  15. /// 公司Id
  16. /// </summary>
  17. public int CompanyId { get; set; }
  18. /// <summary>
  19. /// 部门Id
  20. /// </summary>
  21. public int DepId { get;set; }
  22. /// <summary>
  23. /// 岗位Id
  24. /// </summary>
  25. public int JobPostId { get; set; }
  26. }
  27. /// <summary>
  28. /// 修改用户信息
  29. /// </summary>
  30. public class EditUserDto
  31. {
  32. /// <summary>
  33. /// 用户Id
  34. /// </summary>
  35. public int Id { get; set; }
  36. /// <summary>
  37. /// 工号
  38. /// </summary>
  39. public string Number { get; set; }
  40. /// <summary>
  41. /// 公司Id
  42. /// </summary>
  43. public int CompanyId { get; set; }
  44. /// <summary>
  45. /// 部门Id
  46. /// </summary>
  47. public int DepId { get; set; }
  48. /// <summary>
  49. /// 岗位Id
  50. /// </summary>
  51. public int JobPostId { get; set; }
  52. /// <summary>
  53. /// 分机号
  54. /// </summary>
  55. public string Ext { get; set; }
  56. /// <summary>
  57. /// 试用期
  58. /// </summary>
  59. public string UsePeriod { get; set; }
  60. /// <summary>
  61. /// 人事审核 0未审核(初始状态) 1 已通过(可用)2已拒绝
  62. /// </summary>
  63. public int HrAudit { get; set; }
  64. }
  65. /// <summary>
  66. /// 修改个人信息
  67. /// </summary>
  68. public class EditMyUserDto
  69. {
  70. /// <summary>
  71. /// 用户Id
  72. /// </summary>
  73. public int Id { get; set; }
  74. /// <summary>
  75. /// 中文姓名
  76. /// </summary>
  77. public string CnName { get; set; }
  78. /// <summary>
  79. /// 英文姓名
  80. /// </summary>
  81. public string EnName { get; set; }
  82. /// <summary>
  83. /// 性别0 男1 女 2 未设置
  84. /// </summary>
  85. public int Sex { get; set; }
  86. private string phone;
  87. /// <summary>
  88. /// 手机号
  89. /// </summary>
  90. public string Phone
  91. {
  92. get
  93. {
  94. return phone;
  95. }
  96. set
  97. {
  98. if (Regex.IsMatch(value, @"^[1]+[2,3,4,5,6,7,8,9]+\d{9}"))
  99. {
  100. phone = value;
  101. }
  102. else
  103. {
  104. phone = "";
  105. }
  106. }
  107. }
  108. private string urgentPhone;
  109. /// <summary>
  110. /// 紧急联系人 手机号
  111. /// </summary>
  112. public string UrgentPhone
  113. {
  114. get { return urgentPhone; }
  115. set
  116. {
  117. if (Regex.IsMatch(value, @"^[1]+[2,3,4,5,6,7,8,9]+\d{9}"))
  118. {
  119. urgentPhone = value;
  120. }
  121. else
  122. {
  123. urgentPhone = "";
  124. }
  125. }
  126. }
  127. private string email;
  128. /// <summary>
  129. /// 邮箱
  130. /// </summary>
  131. public string Email
  132. {
  133. get { return email; }
  134. set
  135. {
  136. if (Regex.IsMatch(value, @"^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(com|cn|net)$"))
  137. {
  138. email = value;
  139. }
  140. else
  141. {
  142. email = "";
  143. }
  144. }
  145. }
  146. /// <summary>
  147. /// 住址
  148. /// </summary>
  149. public string Address { get; set; }
  150. /// <summary>
  151. /// 入职时间
  152. /// </summary>
  153. public DateTime Edate { get; set; }
  154. /// <summary>
  155. /// 生日
  156. /// </summary>
  157. public DateTime Birthday { get; set; }
  158. /// <summary>
  159. /// 身份证号码
  160. /// </summary>
  161. public string IDCard { get; set; }
  162. /// <summary>
  163. /// 毕业学校
  164. /// </summary>
  165. public string GraduateInstitutions { get; set; }
  166. /// <summary>
  167. /// 专业
  168. /// </summary>
  169. public string Professional { get; set; }
  170. /// <summary>
  171. /// 学历
  172. /// </summary>
  173. public int Education { get; set; }
  174. /// <summary>
  175. /// 学历类型
  176. /// </summary>
  177. public int TheOrAdultEducation { get; set; }
  178. /// <summary>
  179. /// 婚姻状态
  180. /// </summary>
  181. public string MaritalStatus { get; set; }
  182. /// <summary>
  183. /// 家庭地址
  184. /// </summary>
  185. public string HomeAddress { get; set; }
  186. /// <summary>
  187. /// 工作经历
  188. /// </summary>
  189. public string WorkExperience { get; set; }
  190. /// <summary>
  191. /// 证书上传
  192. /// </summary>
  193. public string Certificate { get; set; }
  194. }
  195. /// <summary>
  196. /// 删除用户信息
  197. /// 即为离职
  198. /// </summary>
  199. public class UserDelDto : PortDtoBase
  200. {
  201. /// <summary>
  202. /// 数据Id
  203. /// </summary>
  204. public int Id { get; set; }
  205. /// <summary>
  206. /// 操作人Id
  207. /// </summary>
  208. public int OperateUserId { get; set; }
  209. }
  210. }