init
This commit is contained in:
@@ -17,6 +17,8 @@ type Product struct {
|
||||
Price float64
|
||||
Cost float64
|
||||
BusinessType constants.BusinessType
|
||||
ImageURL *string
|
||||
PrinterType string
|
||||
Metadata map[string]interface{}
|
||||
IsActive bool
|
||||
CreatedAt time.Time
|
||||
@@ -43,6 +45,8 @@ type CreateProductRequest struct {
|
||||
Price float64 `validate:"required,min=0"`
|
||||
Cost float64 `validate:"min=0"`
|
||||
BusinessType constants.BusinessType `validate:"required"`
|
||||
ImageURL *string `validate:"omitempty,max=500"`
|
||||
PrinterType *string `validate:"omitempty,max=50"`
|
||||
Metadata map[string]interface{}
|
||||
Variants []CreateProductVariantRequest `validate:"omitempty,dive"`
|
||||
// Stock management fields
|
||||
@@ -58,6 +62,8 @@ type UpdateProductRequest struct {
|
||||
Description *string `validate:"omitempty,max=1000"`
|
||||
Price *float64 `validate:"omitempty,min=0"`
|
||||
Cost *float64 `validate:"omitempty,min=0"`
|
||||
ImageURL *string `validate:"omitempty,max=500"`
|
||||
PrinterType *string `validate:"omitempty,max=50"`
|
||||
Metadata map[string]interface{}
|
||||
IsActive *bool
|
||||
// Stock management fields
|
||||
@@ -89,6 +95,8 @@ type ProductResponse struct {
|
||||
Price float64
|
||||
Cost float64
|
||||
BusinessType constants.BusinessType
|
||||
ImageURL *string
|
||||
PrinterType string
|
||||
Metadata map[string]interface{}
|
||||
IsActive bool
|
||||
CreatedAt time.Time
|
||||
|
||||
Reference in New Issue
Block a user