47 lines
2.6 KiB
Go
47 lines
2.6 KiB
Go
|
|
package model
|
||
|
|
|
||
|
|
import "time"
|
||
|
|
|
||
|
|
type AccountsPayable struct {
|
||
|
|
ID string `json:"id" db:"id"`
|
||
|
|
PlanID string `json:"plan_id" db:"plan_id"`
|
||
|
|
PurchaserID string `json:"purchaser_id" db:"purchaser_id"`
|
||
|
|
TextileFactoryID string `json:"textile_factory_id" db:"textile_factory_id"`
|
||
|
|
PricePerMeter float64 `json:"price_per_meter" db:"price_per_meter"`
|
||
|
|
TotalQuantity float64 `json:"total_quantity" db:"total_quantity"`
|
||
|
|
TotalAmount float64 `json:"total_amount" db:"total_amount"`
|
||
|
|
PaidQuantity float64 `json:"paid_quantity" db:"paid_quantity"`
|
||
|
|
PaidAmount float64 `json:"paid_amount" db:"paid_amount"`
|
||
|
|
UnpaidQuantity float64 `json:"unpaid_quantity" db:"unpaid_quantity"`
|
||
|
|
UnpaidAmount float64 `json:"unpaid_amount" db:"unpaid_amount"`
|
||
|
|
Status string `json:"status" db:"status"`
|
||
|
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||
|
|
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
||
|
|
|
||
|
|
// Aggregated
|
||
|
|
PlanCode string `json:"plan_code,omitempty"`
|
||
|
|
FactoryName string `json:"factory_name,omitempty"`
|
||
|
|
}
|
||
|
|
|
||
|
|
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"`
|
||
|
|
}
|