Refactor Customer Entity and Forms to Use 'Companies' Field

- Updated the Customer entity to replace 'CompanyIDs' with 'Companies' for improved clarity and consistency.
- Modified CreateCustomerForm and UpdateCustomerForm to reflect the change from 'CompanyIDs' to 'Companies', ensuring proper validation and structured responses.
- Adjusted service methods to handle the new 'Companies' field, including registration and company assignment logic, enhancing the overall data model and API usability.
This commit is contained in:
n.nakhostin
2025-09-20 10:32:21 +03:30
parent dfcdef60d6
commit 6dcee0bc4b
3 changed files with 58 additions and 60 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ type Customer struct {
Type CustomerType `bson:"type"`
Role CustomerRole `bson:"role"`
Phone *string `bson:"phone"`
CompanyIDs []string `bson:"company_ids"`
Companies []string `bson:"companies"`
DeviceToken []string `bson:"device_token"`
LastLoginAt *int64 `bson:"last_login_at"`
UpdatedAt int64 `bson:"updated_at"`