Refactor company domain by removing customer-related fields and methods
- Removed OwnerCustomerID from Company entity and CompanyResponse to streamline ownership representation. - Eliminated customer assignment fields from CreateCompanyForm and ListCompaniesForm for clarity. - Updated repository and service methods to remove GetByCustomerID and CountWithCustomer, simplifying the codebase. - Adjusted Search method parameters to exclude hasCustomer filter, enhancing search functionality. - Improved API documentation by removing references to customer assignment in handler comments.
This commit is contained in:
@@ -65,9 +65,6 @@ type Company struct {
|
||||
Currency string `bson:"currency" json:"currency"` // Default: "USD"
|
||||
Timezone string `bson:"timezone" json:"timezone"` // Default: "UTC"
|
||||
|
||||
// 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"`
|
||||
UpdatedBy *string `bson:"updated_by,omitempty" json:"updated_by,omitempty"`
|
||||
@@ -167,7 +164,6 @@ type CompanyResponse struct {
|
||||
Language string `json:"language"`
|
||||
Currency string `json:"currency"`
|
||||
Timezone string `json:"timezone"`
|
||||
OwnerCustomerID *string `json:"owner_customer_id,omitempty"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
CreatedBy *string `json:"created_by,omitempty"`
|
||||
@@ -200,7 +196,6 @@ func (c *Company) ToResponse() *CompanyResponse {
|
||||
Language: c.Language,
|
||||
Currency: c.Currency,
|
||||
Timezone: c.Timezone,
|
||||
OwnerCustomerID: c.OwnerCustomerID,
|
||||
CreatedAt: c.CreatedAt,
|
||||
UpdatedAt: c.UpdatedAt,
|
||||
CreatedBy: c.CreatedBy,
|
||||
|
||||
Reference in New Issue
Block a user