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:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user