api-entities/order/model/order.go

19 lines
594 B
Go
Raw Normal View History

2024-12-06 16:44:42 +01:00
package order
import "time"
type OrderModel struct {
State string `db:"state" json:"state"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
UpdatedAt time.Time `db:"updated_at" json:"updated_at,omitempty"`
}
type OrderItemModel struct {
OrderID string `db:"order_id" json:"order_id"`
ProductID int `db:"product_id" json:"product_id"`
Quantity int `db:"quantity" json:"quantity"`
Price float64 `db:"price" json:"price"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
UpdatedAt time.Time `db:"updated_at" json:"updated_at,omitempty"`
}