Merge pull request 'feat: add printer types' (#40) from fix/point-payment-method-types into main

Reviewed-on: #40
This commit was merged in pull request #40.
This commit is contained in:
2026-10-01 17:43:53 +02:00
25 changed files with 2048 additions and 66 deletions
+1 -1
View File
@@ -218,7 +218,7 @@ type OrderItemResponse struct {
Status constants.OrderItemStatus
CreatedAt time.Time
UpdatedAt time.Time
PrinterType string
PrinterTypes []string
PrintToChecker bool
PaidQuantity int
}
+4 -4
View File
@@ -18,7 +18,7 @@ type Product struct {
Cost float64
BusinessType constants.BusinessType
ImageURL *string
PrinterType string
PrinterTypes []string
SellBy string
UnitID *uuid.UUID
HasIngredients bool
@@ -50,7 +50,7 @@ type CreateProductRequest struct {
Cost float64 `validate:"min=0"`
BusinessType constants.BusinessType `validate:"required"`
ImageURL *string `validate:"omitempty,max=500"`
PrinterType *string `validate:"omitempty,max=50"`
PrinterTypes []string `validate:"omitempty,dive,max=50"`
PrintToChecker *bool `validate:"omitempty"`
UnitID *uuid.UUID `validate:"omitempty"`
SellBy string `validate:"omitempty,oneof=unit weight"`
@@ -72,7 +72,7 @@ type UpdateProductRequest struct {
Price *float64 `validate:"omitempty,min=0"`
Cost *float64 `validate:"omitempty,min=0"`
ImageURL *string `validate:"omitempty,max=500"`
PrinterType *string `validate:"omitempty,max=50"`
PrinterTypes []string `validate:"omitempty,dive,max=50"` // Replaces the whole list when not nil
PrintToChecker *bool `validate:"omitempty"`
UnitID *uuid.UUID `validate:"omitempty"`
SellBy *string `validate:"omitempty,oneof=unit weight"`
@@ -112,7 +112,7 @@ type ProductResponse struct {
Cost float64
BusinessType constants.BusinessType
ImageURL *string
PrinterType string
PrinterTypes []string
SellBy string
PrintToChecker bool
UnitID *uuid.UUID