fix user update role and department

This commit is contained in:
efrilm
2025-10-03 13:40:49 +07:00
parent 89d6d8df5e
commit d8942fa918
5 changed files with 51 additions and 9 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ type CreateUserRequest struct {
type UpdateUserRequest struct {
Name *string `json:"name,omitempty" validate:"omitempty,min=1,max=255"`
Email *string `json:"email,omitempty" validate:"omitempty,email"`
Role *string `json:"role,omitempty" validate:"omitempty,oneof=admin manager cashier waiter"`
Role *uuid.UUID `json:"role,omitempty"`
IsActive *bool `json:"is_active,omitempty"`
Permissions *map[string]interface{} `json:"permissions,omitempty"`
DepartmentIDs *[]uuid.UUID `json:"department_ids,omitempty"`