Add Device Token Support for Customer and User Entities

- Introduced a new DeviceToken field in both Customer and User entities to store device tokens for authentication and notifications.
- Updated LoginForm structures for both Customer and User to include an optional DeviceToken field, allowing clients to send device tokens during login.
- Enhanced the Login methods in the customer and user services to append the device token to the respective entities if it does not already exist, improving user session management and notification capabilities.
- Ensured proper validation and structured responses for the new DeviceToken field in the forms, maintaining compliance with best practices for API design.
This commit is contained in:
n.nakhostin
2025-09-20 10:11:36 +03:30
parent 00ad7e136d
commit dfcdef60d6
9 changed files with 48 additions and 7 deletions
+10 -1
View File
@@ -2051,7 +2051,7 @@
"application/json"
],
"tags": [
"Admin Flags"
"Admin-Flags"
],
"summary": "Get flag by country code (Admin)",
"parameters": [
@@ -7045,6 +7045,10 @@
"customer.LoginForm": {
"type": "object",
"properties": {
"device_token": {
"type": "string",
"example": "device_token"
},
"password": {
"type": "string",
"example": "App!1234"
@@ -8071,6 +8075,11 @@
"user.LoginForm": {
"type": "object",
"properties": {
"device_token": {
"description": "Device token",
"type": "string",
"example": "device_token"
},
"password": {
"description": "User password",
"type": "string",