36 lines
775 B
Go
36 lines
775 B
Go
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"`
|
|
}
|