refactor and add outlet product table

This commit is contained in:
2026-05-13 21:58:54 +07:00
parent fa037b4d2a
commit 4130cb66df
19 changed files with 835 additions and 42 deletions
+35
View File
@@ -0,0 +1,35 @@
package models
import (
"time"
"github.com/google/uuid"
)
type ProductOutletPrice struct {
ID uuid.UUID
ProductID uuid.UUID
OutletID uuid.UUID
Price float64
CreatedAt time.Time
UpdatedAt time.Time
}
type CreateProductOutletPriceRequest struct {
ProductID uuid.UUID `validate:"required"`
OutletID uuid.UUID `validate:"required"`
Price float64 `validate:"required,min=0"`
}
type UpdateProductOutletPriceRequest struct {
Price *float64 `validate:"required,min=0"`
}
type ProductOutletPriceResponse struct {
ID uuid.UUID `json:"id"`
ProductID uuid.UUID `json:"product_id"`
OutletID uuid.UUID `json:"outlet_id"`
Price float64 `json:"price"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}