iloom/washing-service/internal/model/finished_product.go
Chever John 9c39c8cbd7
init: iloom WMS monorepo with K8s deployment manifests
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>
2026-06-14 11:33:31 +08:00

48 lines
2.8 KiB
Go

package model
import "time"
type FinishedProduct struct {
ID string `json:"id" db:"id"`
CompanyID string `json:"company_id" db:"company_id"`
ProductName string `json:"product_name" db:"product_name"`
FabricCode string `json:"fabric_code" db:"fabric_code"`
Color string `json:"color" db:"color"`
ColorCode *string `json:"color_code,omitempty" db:"color_code"`
Weight *float64 `json:"weight,omitempty" db:"weight"`
ShrinkageRate float64 `json:"shrinkage_rate" db:"shrinkage_rate"`
WashedMeters float64 `json:"washed_meters" db:"washed_meters"`
StockMeters float64 `json:"stock_meters" db:"stock_meters"`
StockRolls int `json:"stock_rolls" db:"stock_rolls"`
Rolls *int `json:"rolls,omitempty" db:"rolls"`
WashingCost *float64 `json:"washing_cost,omitempty" db:"washing_cost"`
UnitCost *float64 `json:"unit_cost,omitempty" db:"unit_cost"`
Status string `json:"status" db:"status"`
Notes *string `json:"notes,omitempty" db:"notes"`
ProductID *string `json:"product_id,omitempty" db:"product_id"`
WashingPlanID *string `json:"washing_plan_id,omitempty" db:"washing_plan_id"`
WarehouseID *string `json:"warehouse_id,omitempty" db:"warehouse_id"`
WarehouseLocation *string `json:"warehouse_location,omitempty" db:"warehouse_location"`
CreatedBy *string `json:"created_by,omitempty" db:"created_by"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
type FinishedProductInventoryRecord struct {
ID string `json:"id" db:"id"`
FinishedProductID string `json:"finished_product_id" db:"finished_product_id"`
CompanyID string `json:"company_id" db:"company_id"`
RecordType string `json:"record_type" db:"record_type"`
Rolls int `json:"rolls" db:"rolls"`
Meters float64 `json:"meters" db:"meters"`
BatchNo *string `json:"batch_no,omitempty" db:"batch_no"`
Notes *string `json:"notes,omitempty" db:"notes"`
OperatorID *string `json:"operator_id,omitempty" db:"operator_id"`
WarehouseID *string `json:"warehouse_id,omitempty" db:"warehouse_id"`
WarehouseLocation *string `json:"warehouse_location,omitempty" db:"warehouse_location"`
WashingCompletionID *string `json:"washing_completion_id,omitempty" db:"washing_completion_id"`
RelatedOrderID *string `json:"related_order_id,omitempty" db:"related_order_id"`
RelatedOrderType *string `json:"related_order_type,omitempty" db:"related_order_type"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
}