CompanyDto.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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 AddCompanyDto
  13. {
  14. /// <summary>
  15. /// 公司Code
  16. /// </summary>
  17. public string CompanyCode { get; set; }
  18. /// <summary>
  19. /// 公司名称
  20. /// </summary>
  21. public string CompanyName { get; set; }
  22. /// <summary>
  23. /// 公司所在地
  24. /// </summary>
  25. public string Address { get; set; }
  26. /// <summary>
  27. /// 负责人Id
  28. /// </summary>
  29. public int ContactUserId { get; set; }
  30. /// <summary>
  31. /// 联系方式
  32. /// </summary>
  33. private string tel;
  34. public string Tel
  35. {
  36. get
  37. {
  38. return tel;
  39. }
  40. set
  41. {
  42. if (Regex.IsMatch(value, @"^[1]+[2,3,4,5,6,7,8,9]+\d{9}"))
  43. {
  44. tel = value;
  45. }
  46. else
  47. {
  48. tel = "";
  49. }
  50. }
  51. }
  52. /// <summary>
  53. /// 父级公司Id
  54. /// </summary>
  55. public int ParentCompanyId { get; set; }
  56. /// <summary>
  57. /// 创建者Id
  58. /// </summary>
  59. public int CreateUserId { get; set; }
  60. /// <summary>
  61. /// 备注
  62. /// </summary>
  63. public string Remark { get; set; }
  64. }
  65. /// <summary>
  66. /// 修改企业dto
  67. /// </summary>
  68. public class EditCompanyDto
  69. {
  70. /// <summary>
  71. /// 公司Id
  72. /// </summary>
  73. public int Id { get; set; }
  74. /// <summary>
  75. /// 公司Code
  76. /// </summary>
  77. public string CompanyCode { get; set; }
  78. /// <summary>
  79. /// 公司名称
  80. /// </summary>
  81. public string CompanyName { get; set; }
  82. /// <summary>
  83. /// 公司所在地
  84. /// </summary>
  85. public string Address { get; set; }
  86. /// <summary>
  87. /// 负责人Id
  88. /// </summary>
  89. public int ContactUserId { get; set; }
  90. /// <summary>
  91. /// 联系方式
  92. /// </summary>
  93. private string tel;
  94. public string Tel
  95. {
  96. get
  97. {
  98. return tel;
  99. }
  100. set
  101. {
  102. if (Regex.IsMatch(value, @"^[1]+[2,3,4,5,6,7,8,9]+\d{9}"))
  103. {
  104. tel = value;
  105. }
  106. else
  107. {
  108. tel = "";
  109. }
  110. }
  111. }
  112. /// <summary>
  113. /// 父级公司Id
  114. /// </summary>
  115. public int ParentCompanyId { get; set; }
  116. /// <summary>
  117. /// 备注
  118. /// </summary>
  119. public string Remark { get; set; }
  120. }
  121. /// <summary>
  122. /// 删除企业dto
  123. /// </summary>
  124. public class DelCompanyDto
  125. {
  126. /// <summary>
  127. /// 公司Id
  128. /// </summary>
  129. public int Id { get; set; }
  130. }
  131. }