CustomerProfileInput.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?php
  2. namespace Webkul\BagistoApi\Dto;
  3. use ApiPlatform\Metadata\ApiProperty;
  4. use Symfony\Component\Serializer\Annotation\Groups;
  5. /**
  6. * Input DTO for customer profile operations with token-based authentication
  7. * Token is passed via Authorization: Bearer header, NOT as input parameter
  8. *
  9. * NOTE: Token is NOT a DTO property. It is extracted from the Authorization header
  10. * via TokenHeaderFacade::getAuthorizationBearerToken() in the processor.
  11. */
  12. class CustomerProfileInput
  13. {
  14. /**
  15. * Customer ID (optional for get, required for update/delete when multiple profiles exist)
  16. */
  17. #[ApiProperty(required: false)]
  18. #[Groups(['mutation'])]
  19. public ?string $id = null;
  20. /**
  21. * First name
  22. */
  23. #[Groups(['mutation'])]
  24. public ?string $firstName = null;
  25. /**
  26. * Last name
  27. */
  28. #[Groups(['mutation'])]
  29. public ?string $lastName = null;
  30. /**
  31. * Email address
  32. */
  33. #[Groups(['mutation'])]
  34. public ?string $email = null;
  35. /**
  36. * Phone number
  37. */
  38. #[Groups(['mutation'])]
  39. public ?string $phone = null;
  40. /**
  41. * Gender
  42. */
  43. #[Groups(['mutation'])]
  44. public ?string $gender = null;
  45. /**
  46. * Date of birth
  47. */
  48. #[Groups(['mutation'])]
  49. public ?string $dateOfBirth = null;
  50. /**
  51. * Current password — required when changing password
  52. */
  53. #[Groups(['mutation'])]
  54. public ?string $currentPassword = null;
  55. /**
  56. * New password
  57. */
  58. #[Groups(['mutation'])]
  59. public ?string $password = null;
  60. /**
  61. * New password confirmation
  62. */
  63. #[Groups(['mutation'])]
  64. public ?string $confirmPassword = null;
  65. /**
  66. * Customer status
  67. */
  68. #[Groups(['mutation'])]
  69. public ?string $status = null;
  70. /**
  71. * Newsletter subscription
  72. */
  73. #[Groups(['mutation'])]
  74. public ?bool $subscribedToNewsLetter = null;
  75. /**
  76. * Verification status
  77. */
  78. #[Groups(['mutation'])]
  79. public ?string $isVerified = null;
  80. /**
  81. * Suspension status
  82. */
  83. #[Groups(['mutation'])]
  84. public ?string $isSuspended = null;
  85. /**
  86. * Customer profile image (base64 encoded)
  87. * Format: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEA...
  88. */
  89. #[Groups(['mutation'])]
  90. public ?string $image = null;
  91. /**
  92. * Flag to delete existing image
  93. */
  94. #[Groups(['mutation'])]
  95. public ?bool $deleteImage = null;
  96. /**
  97. * Success status of the operation
  98. */
  99. #[Groups(['mutation'])]
  100. public ?bool $success = null;
  101. /**
  102. * Response message
  103. */
  104. #[Groups(['mutation'])]
  105. public ?string $message = null;
  106. }