Go workspace (go.work) with 5 microservices + shared library: - gateway (8080), auth-service (8081), purchaser-service (8082) - textile-service (8083), washing-service (8084) - shared: proto definitions, common packages Infrastructure: docker-compose for local dev, K8s manifests for K3s cluster deployment (mysql/redis/etcd + traefik ingress). Frontend (iloom-flatten) added as git submodule. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44 lines
1.9 KiB
Go
44 lines
1.9 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
type InventoryRecord struct {
|
|
ID string `json:"id" db:"id"`
|
|
PlanID string `json:"plan_id" db:"plan_id"`
|
|
WarehouseID string `json:"warehouse_id" db:"warehouse_id"`
|
|
Quantity float64 `json:"quantity" db:"quantity"`
|
|
Rolls *int `json:"rolls,omitempty" db:"rolls"`
|
|
PricePerMeter *float64 `json:"price_per_meter,omitempty" db:"price_per_meter"`
|
|
PriceNote *string `json:"price_note,omitempty" db:"price_note"`
|
|
WarehouseLocation *string `json:"warehouse_location,omitempty" db:"warehouse_location"`
|
|
OperatorID *string `json:"operator_id,omitempty" db:"operator_id"`
|
|
CompanyID *string `json:"company_id,omitempty" db:"company_id"`
|
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
|
}
|
|
|
|
type Warehouse struct {
|
|
ID string `json:"id" db:"id"`
|
|
CompanyID string `json:"company_id" db:"company_id"`
|
|
Name string `json:"name" db:"name"`
|
|
Type string `json:"type" db:"type"`
|
|
Location *string `json:"location,omitempty" db:"location"`
|
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
|
}
|
|
|
|
type Payment struct {
|
|
ID string `json:"id" db:"id"`
|
|
PlanID string `json:"plan_id" db:"plan_id"`
|
|
FromCompanyID string `json:"from_company_id" db:"from_company_id"`
|
|
ToCompanyID string `json:"to_company_id" db:"to_company_id"`
|
|
Amount float64 `json:"amount" db:"amount"`
|
|
Quantity float64 `json:"quantity" db:"quantity"`
|
|
PricePerMeter float64 `json:"price_per_meter" db:"price_per_meter"`
|
|
Status string `json:"status" db:"status"`
|
|
PaidAt *time.Time `json:"paid_at,omitempty" db:"paid_at"`
|
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
|
|
|
// Aggregated
|
|
PlanCode string `json:"plan_code,omitempty"`
|
|
FromCompanyName string `json:"from_company_name,omitempty"`
|
|
}
|