29 lines
1.7 KiB
Go
29 lines
1.7 KiB
Go
|
|
package model
|
||
|
|
|
||
|
|
import "time"
|
||
|
|
|
||
|
|
type WashingPlan struct {
|
||
|
|
ID string `json:"id" db:"id"`
|
||
|
|
PlanCode string `json:"plan_code" db:"plan_code"`
|
||
|
|
CompanyID string `json:"company_id" db:"company_id"`
|
||
|
|
ProductID string `json:"product_id" db:"product_id"`
|
||
|
|
WashingFactoryID *string `json:"washing_factory_id,omitempty" db:"washing_factory_id"`
|
||
|
|
PlannedMeters float64 `json:"planned_meters" db:"planned_meters"`
|
||
|
|
WashingPrice float64 `json:"washing_price" db:"washing_price"`
|
||
|
|
EstimatedShrinkageRate float64 `json:"estimated_shrinkage_rate" db:"estimated_shrinkage_rate"`
|
||
|
|
EstimatedWashedMeters *float64 `json:"estimated_washed_meters,omitempty" db:"estimated_washed_meters"`
|
||
|
|
EstimatedTotalCost *float64 `json:"estimated_total_cost,omitempty" db:"estimated_total_cost"`
|
||
|
|
ActualShrinkageRate *float64 `json:"actual_shrinkage_rate,omitempty" db:"actual_shrinkage_rate"`
|
||
|
|
ActualWashedMeters *float64 `json:"actual_washed_meters,omitempty" db:"actual_washed_meters"`
|
||
|
|
ActualTotalCost *float64 `json:"actual_total_cost,omitempty" db:"actual_total_cost"`
|
||
|
|
WashingDate *time.Time `json:"washing_date,omitempty" db:"washing_date"`
|
||
|
|
Status string `json:"status" db:"status"`
|
||
|
|
Notes *string `json:"notes,omitempty" db:"notes"`
|
||
|
|
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"`
|
||
|
|
// Aggregated fields
|
||
|
|
ProductName string `json:"product_name,omitempty"`
|
||
|
|
PurchaserName string `json:"purchaser_name,omitempty"`
|
||
|
|
}
|