Update API documentation to reflect customer authorization changes

- Changed tags from "Customers-Mobile" to "Customers-Authorization" in Swagger documentation for customer logout and profile retrieval endpoints.
- Updated the Company entity to replace CustomerID with OwnerCustomerID to better represent ownership.
- Removed obsolete customer assignment methods and related forms from the company domain, streamlining the codebase.
- Adjusted customer forms to include CompanyID instead of CompanyName for better consistency in customer management.
- Enhanced Swagger documentation to accurately reflect the new structure and authorization details for customer-related endpoints.
This commit is contained in:
n.nakhostin
2025-08-11 16:24:28 +03:30
parent 1e998b365e
commit 566fa07574
12 changed files with 41 additions and 270 deletions
+4 -4
View File
@@ -63,8 +63,8 @@ type Company struct {
Currency string `bson:"currency" json:"currency"` // Default: "USD"
Timezone string `bson:"timezone" json:"timezone"` // Default: "UTC"
// Customer assignment (for login credentials)
CustomerID *string `bson:"customer_id,omitempty" json:"customer_id,omitempty"`
// Company ownership - which customer owns this company
OwnerCustomerID *string `bson:"owner_customer_id,omitempty" json:"owner_customer_id,omitempty"`
// Audit fields
CreatedBy *string `bson:"created_by,omitempty" json:"created_by,omitempty"`
@@ -165,7 +165,7 @@ type CompanyResponse struct {
Language string `json:"language"`
Currency string `json:"currency"`
Timezone string `json:"timezone"`
CustomerID *string `json:"customer_id,omitempty"`
OwnerCustomerID *string `json:"owner_customer_id,omitempty"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
CreatedBy *string `json:"created_by,omitempty"`
@@ -198,7 +198,7 @@ func (c *Company) ToResponse() *CompanyResponse {
Language: c.Language,
Currency: c.Currency,
Timezone: c.Timezone,
CustomerID: c.CustomerID,
OwnerCustomerID: c.OwnerCustomerID,
CreatedAt: c.CreatedAt,
UpdatedAt: c.UpdatedAt,
CreatedBy: c.CreatedBy,