Fix formatting
This commit is contained in:
parent
69d8c8ce5e
commit
29aeb58fc0
@ -5,12 +5,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type CreateAccountRequest struct {
|
type CreateAccountRequest struct {
|
||||||
ChartOfAccountID uuid.UUID `json:"chart_of_account_id" validate:"required"`
|
ChartOfAccountID uuid.UUID `json:"chart_of_account_id" validate:"required"`
|
||||||
Name string `json:"name" validate:"required,min=1,max=255"`
|
Name string `json:"name" validate:"required,min=1,max=255"`
|
||||||
Number string `json:"number" validate:"required,min=1,max=50"`
|
Number string `json:"number" validate:"required,min=1,max=50"`
|
||||||
AccountType string `json:"account_type" validate:"required,oneof=cash wallet bank credit debit asset liability equity revenue expense"`
|
AccountType string `json:"account_type" validate:"required,oneof=cash wallet bank credit debit asset liability equity revenue expense"`
|
||||||
OpeningBalance float64 `json:"opening_balance"`
|
OpeningBalance float64 `json:"opening_balance"`
|
||||||
Description *string `json:"description"`
|
Description *string `json:"description"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UpdateAccountRequest struct {
|
type UpdateAccountRequest struct {
|
||||||
@ -24,21 +24,21 @@ type UpdateAccountRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type AccountResponse struct {
|
type AccountResponse struct {
|
||||||
ID uuid.UUID `json:"id"`
|
ID uuid.UUID `json:"id"`
|
||||||
OrganizationID uuid.UUID `json:"organization_id"`
|
OrganizationID uuid.UUID `json:"organization_id"`
|
||||||
OutletID *uuid.UUID `json:"outlet_id"`
|
OutletID *uuid.UUID `json:"outlet_id"`
|
||||||
ChartOfAccountID uuid.UUID `json:"chart_of_account_id"`
|
ChartOfAccountID uuid.UUID `json:"chart_of_account_id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Number string `json:"number"`
|
Number string `json:"number"`
|
||||||
AccountType string `json:"account_type"`
|
AccountType string `json:"account_type"`
|
||||||
OpeningBalance float64 `json:"opening_balance"`
|
OpeningBalance float64 `json:"opening_balance"`
|
||||||
CurrentBalance float64 `json:"current_balance"`
|
CurrentBalance float64 `json:"current_balance"`
|
||||||
Description *string `json:"description"`
|
Description *string `json:"description"`
|
||||||
IsActive bool `json:"is_active"`
|
IsActive bool `json:"is_active"`
|
||||||
IsSystem bool `json:"is_system"`
|
IsSystem bool `json:"is_system"`
|
||||||
CreatedAt string `json:"created_at"`
|
CreatedAt string `json:"created_at"`
|
||||||
UpdatedAt string `json:"updated_at"`
|
UpdatedAt string `json:"updated_at"`
|
||||||
ChartOfAccount *ChartOfAccountResponse `json:"chart_of_account,omitempty"`
|
ChartOfAccount *ChartOfAccountResponse `json:"chart_of_account,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ListAccountsRequest struct {
|
type ListAccountsRequest struct {
|
||||||
|
|||||||
@ -81,4 +81,3 @@ type IngredientUnitsResponse struct {
|
|||||||
BaseUnitName string `json:"base_unit_name"`
|
BaseUnitName string `json:"base_unit_name"`
|
||||||
Units []*UnitResponse `json:"units"`
|
Units []*UnitResponse `json:"units"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,9 +26,9 @@ type AdjustInventoryRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type RestockInventoryRequest struct {
|
type RestockInventoryRequest struct {
|
||||||
OutletID uuid.UUID `json:"outlet_id" validate:"required"`
|
OutletID uuid.UUID `json:"outlet_id" validate:"required"`
|
||||||
Items []RestockItem `json:"items" validate:"required,min=1,dive"`
|
Items []RestockItem `json:"items" validate:"required,min=1,dive"`
|
||||||
Reason string `json:"reason" validate:"required,min=1,max=255"`
|
Reason string `json:"reason" validate:"required,min=1,max=255"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RestockItem struct {
|
type RestockItem struct {
|
||||||
@ -82,10 +82,10 @@ type InventoryAdjustmentResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type RestockInventoryResponse struct {
|
type RestockInventoryResponse struct {
|
||||||
OutletID uuid.UUID `json:"outlet_id"`
|
OutletID uuid.UUID `json:"outlet_id"`
|
||||||
Items []RestockItemResult `json:"items"`
|
Items []RestockItemResult `json:"items"`
|
||||||
Reason string `json:"reason"`
|
Reason string `json:"reason"`
|
||||||
RestockedAt time.Time `json:"restocked_at"`
|
RestockedAt time.Time `json:"restocked_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RestockItemResult struct {
|
type RestockItemResult struct {
|
||||||
|
|||||||
@ -34,34 +34,34 @@ type BulkCreateProductRecipeRequest struct {
|
|||||||
|
|
||||||
// Response structures
|
// Response structures
|
||||||
type ProductRecipeResponse struct {
|
type ProductRecipeResponse struct {
|
||||||
ID uuid.UUID `json:"id"`
|
ID uuid.UUID `json:"id"`
|
||||||
OrganizationID uuid.UUID `json:"organization_id"`
|
OrganizationID uuid.UUID `json:"organization_id"`
|
||||||
OutletID *uuid.UUID `json:"outlet_id"`
|
OutletID *uuid.UUID `json:"outlet_id"`
|
||||||
ProductID uuid.UUID `json:"product_id"`
|
ProductID uuid.UUID `json:"product_id"`
|
||||||
VariantID *uuid.UUID `json:"variant_id"`
|
VariantID *uuid.UUID `json:"variant_id"`
|
||||||
IngredientID uuid.UUID `json:"ingredient_id"`
|
IngredientID uuid.UUID `json:"ingredient_id"`
|
||||||
Quantity float64 `json:"quantity"`
|
Quantity float64 `json:"quantity"`
|
||||||
WastePercentage float64 `json:"waste_percentage"`
|
WastePercentage float64 `json:"waste_percentage"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
Product *ProductResponse `json:"product,omitempty"`
|
Product *ProductResponse `json:"product,omitempty"`
|
||||||
ProductVariant *ProductVariantResponse `json:"product_variant,omitempty"`
|
ProductVariant *ProductVariantResponse `json:"product_variant,omitempty"`
|
||||||
Ingredient *ProductRecipeIngredientResponse `json:"ingredient,omitempty"`
|
Ingredient *ProductRecipeIngredientResponse `json:"ingredient,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProductRecipeIngredientResponse struct {
|
type ProductRecipeIngredientResponse struct {
|
||||||
ID uuid.UUID `json:"id"`
|
ID uuid.UUID `json:"id"`
|
||||||
OrganizationID uuid.UUID `json:"organization_id"`
|
OrganizationID uuid.UUID `json:"organization_id"`
|
||||||
OutletID *uuid.UUID `json:"outlet_id"`
|
OutletID *uuid.UUID `json:"outlet_id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
UnitID uuid.UUID `json:"unit_id"`
|
UnitID uuid.UUID `json:"unit_id"`
|
||||||
Cost float64 `json:"cost"`
|
Cost float64 `json:"cost"`
|
||||||
Stock float64 `json:"stock"`
|
Stock float64 `json:"stock"`
|
||||||
IsSemiFinished bool `json:"is_semi_finished"`
|
IsSemiFinished bool `json:"is_semi_finished"`
|
||||||
IsActive bool `json:"is_active"`
|
IsActive bool `json:"is_active"`
|
||||||
Metadata map[string]interface{} `json:"metadata"`
|
Metadata map[string]interface{} `json:"metadata"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
Unit *ProductRecipeUnitResponse `json:"unit,omitempty"`
|
Unit *ProductRecipeUnitResponse `json:"unit,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,4 +39,3 @@ func (iuc *IngredientUnitConverter) BeforeCreate() error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,14 +26,14 @@ type OrderIngredientTransaction struct {
|
|||||||
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
|
UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"`
|
||||||
|
|
||||||
// Relations
|
// Relations
|
||||||
Organization Organization `gorm:"foreignKey:OrganizationID" json:"organization,omitempty"`
|
Organization Organization `gorm:"foreignKey:OrganizationID" json:"organization,omitempty"`
|
||||||
Outlet *Outlet `gorm:"foreignKey:OutletID" json:"outlet,omitempty"`
|
Outlet *Outlet `gorm:"foreignKey:OutletID" json:"outlet,omitempty"`
|
||||||
Order Order `gorm:"foreignKey:OrderID" json:"order,omitempty"`
|
Order Order `gorm:"foreignKey:OrderID" json:"order,omitempty"`
|
||||||
OrderItem *OrderItem `gorm:"foreignKey:OrderItemID" json:"order_item,omitempty"`
|
OrderItem *OrderItem `gorm:"foreignKey:OrderItemID" json:"order_item,omitempty"`
|
||||||
Product Product `gorm:"foreignKey:ProductID" json:"product,omitempty"`
|
Product Product `gorm:"foreignKey:ProductID" json:"product,omitempty"`
|
||||||
ProductVariant *ProductVariant `gorm:"foreignKey:ProductVariantID" json:"product_variant,omitempty"`
|
ProductVariant *ProductVariant `gorm:"foreignKey:ProductVariantID" json:"product_variant,omitempty"`
|
||||||
Ingredient Ingredient `gorm:"foreignKey:IngredientID" json:"ingredient,omitempty"`
|
Ingredient Ingredient `gorm:"foreignKey:IngredientID" json:"ingredient,omitempty"`
|
||||||
CreatedByUser User `gorm:"foreignKey:CreatedBy" json:"created_by_user,omitempty"`
|
CreatedByUser User `gorm:"foreignKey:CreatedBy" json:"created_by_user,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (oit *OrderIngredientTransaction) BeforeCreate(tx *gorm.DB) error {
|
func (oit *OrderIngredientTransaction) BeforeCreate(tx *gorm.DB) error {
|
||||||
|
|||||||
@ -7,15 +7,15 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type ProductIngredient struct {
|
type ProductIngredient struct {
|
||||||
ID uuid.UUID `json:"id" db:"id"`
|
ID uuid.UUID `json:"id" db:"id"`
|
||||||
OrganizationID uuid.UUID `json:"organization_id" db:"organization_id"`
|
OrganizationID uuid.UUID `json:"organization_id" db:"organization_id"`
|
||||||
OutletID *uuid.UUID `json:"outlet_id" db:"outlet_id"`
|
OutletID *uuid.UUID `json:"outlet_id" db:"outlet_id"`
|
||||||
ProductID uuid.UUID `json:"product_id" db:"product_id"`
|
ProductID uuid.UUID `json:"product_id" db:"product_id"`
|
||||||
IngredientID uuid.UUID `json:"ingredient_id" db:"ingredient_id"`
|
IngredientID uuid.UUID `json:"ingredient_id" db:"ingredient_id"`
|
||||||
Quantity float64 `json:"quantity" db:"quantity"`
|
Quantity float64 `json:"quantity" db:"quantity"`
|
||||||
WastePercentage float64 `json:"waste_percentage" db:"waste_percentage"`
|
WastePercentage float64 `json:"waste_percentage" db:"waste_percentage"`
|
||||||
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
||||||
|
|
||||||
// Relations
|
// Relations
|
||||||
Product *Product `json:"product,omitempty"`
|
Product *Product `json:"product,omitempty"`
|
||||||
|
|||||||
@ -275,4 +275,3 @@ func (h *IngredientUnitConverterHandler) GetUnitsByIngredientID(c *gin.Context)
|
|||||||
|
|
||||||
util.HandleResponse(c.Writer, c.Request, unitsResponse, "IngredientUnitConverterHandler::GetUnitsByIngredientID")
|
util.HandleResponse(c.Writer, c.Request, unitsResponse, "IngredientUnitConverterHandler::GetUnitsByIngredientID")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,17 +11,17 @@ func MapProductIngredientEntityToModel(entity *entities.ProductIngredient) *mode
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &models.ProductIngredient{
|
return &models.ProductIngredient{
|
||||||
ID: entity.ID,
|
ID: entity.ID,
|
||||||
OrganizationID: entity.OrganizationID,
|
OrganizationID: entity.OrganizationID,
|
||||||
OutletID: entity.OutletID,
|
OutletID: entity.OutletID,
|
||||||
ProductID: entity.ProductID,
|
ProductID: entity.ProductID,
|
||||||
IngredientID: entity.IngredientID,
|
IngredientID: entity.IngredientID,
|
||||||
Quantity: entity.Quantity,
|
Quantity: entity.Quantity,
|
||||||
WastePercentage: entity.WastePercentage,
|
WastePercentage: entity.WastePercentage,
|
||||||
CreatedAt: entity.CreatedAt,
|
CreatedAt: entity.CreatedAt,
|
||||||
UpdatedAt: entity.UpdatedAt,
|
UpdatedAt: entity.UpdatedAt,
|
||||||
Product: ProductEntityToModel(entity.Product),
|
Product: ProductEntityToModel(entity.Product),
|
||||||
Ingredient: MapIngredientEntityToModel(entity.Ingredient),
|
Ingredient: MapIngredientEntityToModel(entity.Ingredient),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,17 +31,17 @@ func MapProductIngredientModelToEntity(model *models.ProductIngredient) *entitie
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &entities.ProductIngredient{
|
return &entities.ProductIngredient{
|
||||||
ID: model.ID,
|
ID: model.ID,
|
||||||
OrganizationID: model.OrganizationID,
|
OrganizationID: model.OrganizationID,
|
||||||
OutletID: model.OutletID,
|
OutletID: model.OutletID,
|
||||||
ProductID: model.ProductID,
|
ProductID: model.ProductID,
|
||||||
IngredientID: model.IngredientID,
|
IngredientID: model.IngredientID,
|
||||||
Quantity: model.Quantity,
|
Quantity: model.Quantity,
|
||||||
WastePercentage: model.WastePercentage,
|
WastePercentage: model.WastePercentage,
|
||||||
CreatedAt: model.CreatedAt,
|
CreatedAt: model.CreatedAt,
|
||||||
UpdatedAt: model.UpdatedAt,
|
UpdatedAt: model.UpdatedAt,
|
||||||
Product: ProductModelToEntity(model.Product),
|
Product: ProductModelToEntity(model.Product),
|
||||||
Ingredient: MapIngredientModelToEntity(model.Ingredient),
|
Ingredient: MapIngredientModelToEntity(model.Ingredient),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,12 +25,12 @@ type AccountResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CreateAccountRequest struct {
|
type CreateAccountRequest struct {
|
||||||
ChartOfAccountID uuid.UUID `json:"chart_of_account_id" validate:"required"`
|
ChartOfAccountID uuid.UUID `json:"chart_of_account_id" validate:"required"`
|
||||||
Name string `json:"name" validate:"required,min=1,max=255"`
|
Name string `json:"name" validate:"required,min=1,max=255"`
|
||||||
Number string `json:"number" validate:"required,min=1,max=50"`
|
Number string `json:"number" validate:"required,min=1,max=50"`
|
||||||
AccountType string `json:"account_type" validate:"required,oneof=cash wallet bank credit debit asset liability equity revenue expense"`
|
AccountType string `json:"account_type" validate:"required,oneof=cash wallet bank credit debit asset liability equity revenue expense"`
|
||||||
OpeningBalance float64 `json:"opening_balance"`
|
OpeningBalance float64 `json:"opening_balance"`
|
||||||
Description *string `json:"description"`
|
Description *string `json:"description"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type UpdateAccountRequest struct {
|
type UpdateAccountRequest struct {
|
||||||
|
|||||||
@ -23,17 +23,17 @@ type UpdateCustomerRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CustomerResponse struct {
|
type CustomerResponse struct {
|
||||||
ID uuid.UUID `json:"id"`
|
ID uuid.UUID `json:"id"`
|
||||||
OrganizationID uuid.UUID `json:"organization_id"`
|
OrganizationID uuid.UUID `json:"organization_id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Email *string `json:"email,omitempty"`
|
Email *string `json:"email,omitempty"`
|
||||||
Phone *string `json:"phone,omitempty"`
|
Phone *string `json:"phone,omitempty"`
|
||||||
Address *string `json:"address,omitempty"`
|
Address *string `json:"address,omitempty"`
|
||||||
IsDefault bool `json:"is_default"`
|
IsDefault bool `json:"is_default"`
|
||||||
IsActive bool `json:"is_active"`
|
IsActive bool `json:"is_active"`
|
||||||
Metadata entities.Metadata `json:"metadata"`
|
Metadata entities.Metadata `json:"metadata"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ListCustomersQuery represents query parameters for listing customers
|
// ListCustomersQuery represents query parameters for listing customers
|
||||||
|
|||||||
@ -101,4 +101,3 @@ type IngredientUnitsResponse struct {
|
|||||||
BaseUnitName string `json:"base_unit_name"`
|
BaseUnitName string `json:"base_unit_name"`
|
||||||
Units []*UnitResponse `json:"units"`
|
Units []*UnitResponse `json:"units"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -52,8 +52,8 @@ type UpdateOrderIngredientTransactionRequest struct {
|
|||||||
GrossQty *float64 `json:"gross_qty,omitempty" validate:"omitempty,gt=0"`
|
GrossQty *float64 `json:"gross_qty,omitempty" validate:"omitempty,gt=0"`
|
||||||
NetQty *float64 `json:"net_qty,omitempty" validate:"omitempty,gt=0"`
|
NetQty *float64 `json:"net_qty,omitempty" validate:"omitempty,gt=0"`
|
||||||
WasteQty *float64 `json:"waste_qty,omitempty" validate:"min=0"`
|
WasteQty *float64 `json:"waste_qty,omitempty" validate:"min=0"`
|
||||||
Unit *string `json:"unit,omitempty" validate:"omitempty,max=50"`
|
Unit *string `json:"unit,omitempty" validate:"omitempty,max=50"`
|
||||||
TransactionDate *time.Time `json:"transaction_date,omitempty"`
|
TransactionDate *time.Time `json:"transaction_date,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type OrderIngredientTransactionResponse struct {
|
type OrderIngredientTransactionResponse struct {
|
||||||
@ -98,11 +98,11 @@ type ListOrderIngredientTransactionsRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type OrderIngredientTransactionSummary struct {
|
type OrderIngredientTransactionSummary struct {
|
||||||
IngredientID uuid.UUID `json:"ingredient_id"`
|
IngredientID uuid.UUID `json:"ingredient_id"`
|
||||||
IngredientName string `json:"ingredient_name"`
|
IngredientName string `json:"ingredient_name"`
|
||||||
TotalGrossQty float64 `json:"total_gross_qty"`
|
TotalGrossQty float64 `json:"total_gross_qty"`
|
||||||
TotalNetQty float64 `json:"total_net_qty"`
|
TotalNetQty float64 `json:"total_net_qty"`
|
||||||
TotalWasteQty float64 `json:"total_waste_qty"`
|
TotalWasteQty float64 `json:"total_waste_qty"`
|
||||||
WastePercentage float64 `json:"waste_percentage"`
|
WastePercentage float64 `json:"waste_percentage"`
|
||||||
Unit string `json:"unit"`
|
Unit string `json:"unit"`
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,15 +7,15 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type ProductIngredient struct {
|
type ProductIngredient struct {
|
||||||
ID uuid.UUID `json:"id"`
|
ID uuid.UUID `json:"id"`
|
||||||
OrganizationID uuid.UUID `json:"organization_id"`
|
OrganizationID uuid.UUID `json:"organization_id"`
|
||||||
OutletID *uuid.UUID `json:"outlet_id"`
|
OutletID *uuid.UUID `json:"outlet_id"`
|
||||||
ProductID uuid.UUID `json:"product_id"`
|
ProductID uuid.UUID `json:"product_id"`
|
||||||
IngredientID uuid.UUID `json:"ingredient_id"`
|
IngredientID uuid.UUID `json:"ingredient_id"`
|
||||||
Quantity float64 `json:"quantity"`
|
Quantity float64 `json:"quantity"`
|
||||||
WastePercentage float64 `json:"waste_percentage"`
|
WastePercentage float64 `json:"waste_percentage"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
|
|
||||||
// Relations
|
// Relations
|
||||||
Product *Product `json:"product,omitempty"`
|
Product *Product `json:"product,omitempty"`
|
||||||
@ -37,15 +37,15 @@ type UpdateProductIngredientRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ProductIngredientResponse struct {
|
type ProductIngredientResponse struct {
|
||||||
ID uuid.UUID `json:"id"`
|
ID uuid.UUID `json:"id"`
|
||||||
OrganizationID uuid.UUID `json:"organization_id"`
|
OrganizationID uuid.UUID `json:"organization_id"`
|
||||||
OutletID *uuid.UUID `json:"outlet_id"`
|
OutletID *uuid.UUID `json:"outlet_id"`
|
||||||
ProductID uuid.UUID `json:"product_id"`
|
ProductID uuid.UUID `json:"product_id"`
|
||||||
IngredientID uuid.UUID `json:"ingredient_id"`
|
IngredientID uuid.UUID `json:"ingredient_id"`
|
||||||
Quantity float64 `json:"quantity"`
|
Quantity float64 `json:"quantity"`
|
||||||
WastePercentage float64 `json:"waste_percentage"`
|
WastePercentage float64 `json:"waste_percentage"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt time.Time `json:"created_at"`
|
||||||
UpdatedAt time.Time `json:"updated_at"`
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
|
|
||||||
// Relations
|
// Relations
|
||||||
Product *Product `json:"product,omitempty"`
|
Product *Product `json:"product,omitempty"`
|
||||||
|
|||||||
@ -160,4 +160,3 @@ func (s *IngredientUnitConverterServiceImpl) GetUnitsByIngredientID(ctx context.
|
|||||||
contractResponse := transformer.IngredientUnitsModelResponseToResponse(unitsResponse)
|
contractResponse := transformer.IngredientUnitsModelResponseToResponse(unitsResponse)
|
||||||
return contract.BuildSuccessResponse(contractResponse)
|
return contract.BuildSuccessResponse(contractResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -175,4 +175,3 @@ func IngredientUnitsModelResponseToResponse(model *models.IngredientUnitsRespons
|
|||||||
|
|
||||||
return response
|
return response
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -119,4 +119,3 @@ func (v *IngredientUnitConverterValidatorImpl) ValidateConvertUnitRequest(req *c
|
|||||||
|
|
||||||
return nil, ""
|
return nil, ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user