ContactDto.cs 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. using System.Runtime.CompilerServices;
  2. using Quadarax.Application.QLiberace.Common.Dtos;
  3. using Quadarax.Application.QLiberace.Customer.Enums;
  4. using Quadarax.Foundation.Core.Data.Interface.Entity;
  5. #if DEBUG
  6. [assembly: InternalsVisibleTo("qdr.app.qlbrc.base.Tests")]
  7. [assembly: InternalsVisibleTo("qdr.app.qlbrc.common.Tests")]
  8. #endif
  9. namespace Quadarax.Application.QLiberace.Customer.Dtos
  10. {
  11. public class ContactRDto : QlbrcDtoTrackedWithId, IReadDto
  12. {
  13. /// <summary>
  14. /// Reference to customer that contact belongs
  15. /// </summary>
  16. public long CustomerId { get; set; }
  17. /// <summary>
  18. /// Contact type (0-Email, 1-Address, 2-Phone, 3-SMS)
  19. /// </summary>
  20. public ContactTypeEnum Type { get; set; }
  21. /// <summary>
  22. /// Contact heading caption.
  23. /// </summary>
  24. public string Caption { get; set; } = null!;
  25. /// <summary>
  26. /// Main address value. If phone, email, sms stores email address or telephone number.
  27. /// </summary>
  28. public string Address { get; set; } = null!;
  29. /// <summary>
  30. /// Secondary address value.
  31. /// </summary>
  32. public string? Address1 { get; set; }
  33. /// <summary>
  34. /// Contact city.
  35. /// </summary>
  36. public string? City { get; set; }
  37. /// <summary>
  38. /// Contact ZIP code.
  39. /// </summary>
  40. public string? Zip { get; set; }
  41. /// <summary>
  42. /// Contact country code.
  43. /// </summary>
  44. public string? CountryCode { get; set; }
  45. /// <summary>
  46. /// Flag if Contact is preffered.
  47. /// </summary>
  48. public bool IsPreffered { get; set; }
  49. }
  50. public class ContactWDto : QlbrcDtoWithoutId, IUpdateDto, ICreateDto
  51. {
  52. /// <summary>
  53. /// Contact type (0-Email, 1-Address, 2-Phone, 3-SMS)
  54. /// </summary>
  55. public ContactTypeEnum Type { get; set; }
  56. /// <summary>
  57. /// Contact heading caption.
  58. /// </summary>
  59. public string Caption { get; set; } = null!;
  60. /// <summary>
  61. /// Main address value. If phone, email, sms stores email address or telephone number.
  62. /// </summary>
  63. public string Address { get; set; } = null!;
  64. /// <summary>
  65. /// Secondary address value.
  66. /// </summary>
  67. public string? Address1 { get; set; }
  68. /// <summary>
  69. /// Contact city.
  70. /// </summary>
  71. public string? City { get; set; }
  72. /// <summary>
  73. /// Contact ZIP code.
  74. /// </summary>
  75. public string? Zip { get; set; }
  76. /// <summary>
  77. /// Contact country code.
  78. /// </summary>
  79. public string? CountryCode { get; set; }
  80. /// <summary>
  81. /// Flag if Contact is preffered.
  82. /// </summary>
  83. public bool IsPreferred { get; set; }
  84. }
  85. public class ContactDDto : QlbrcDtoWithId, IDeleteDto
  86. {
  87. }
  88. }