package models

type OutsourcingPlan struct {
	ID          *string `json:"id" db:"id" id_type:"UUID"`
	Code        *string `json:"code" db:"code"`
	Name        *string `json:"name" db:"name"`
	SaleOrderId *string `json:"saleOrderId" db:"sale_order_id"`
	CreateTime  *string `json:"createTime" db:"create_time"`
	CreateId    *int64  `json:"createId" db:"create_id"`
	UpdateId    *int64  `json:"updateId" db:"update_id"`
	Status      *string `json:"status" db:"status"`
	TenantId    *string `json:"tenantId" db:"tenant_id"`
	UpdateTime  *string `json:"updateTime" db:"update_time"`
	BeginDate   *string `json:"beginDate" db:"begin_date"`
	EndDate     *string `json:"endDate" db:"end_date"`

	EmptyField   *[]string                `json:"emptyField" db:"-"`
	FileList     *[]MinioFile             `json:"fileList" db:"-"`
	ChildrenList *[]OutsourcingPlanDetail `json:"childrenList" db:"-"`
	SaleOrder    *SaleOrder               `json:"saleOrder" db:"-"`
}

type OutsourcingPlanDetail struct {
	ID           *string  `json:"id" db:"id" id_type:"UUID"`
	PlanId       *string  `json:"planId" db:"plan_id"`
	MaterialCode *string  `json:"materialCode" db:"material_code"`
	Number       *float64 `json:"number" db:"number"`

	ProductMaterial *ProductMaterial `json:"material" db:"-"`
}
