iloom/washing-service/internal/model/finished_product.go

48 lines
2.8 KiB
Go
Raw Permalink Normal View History

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"`
}