package models

type ProcessStage struct {
	ID              *string `json:"id" db:"id" id_type:"UUID"`
	Name            *string `json:"name" db:"name"`
	Code            *string `json:"code" db:"code"`
	DirectorName    *string `json:"directorName" db:"director_name"`
	DirectorPhone   *string `json:"directorPhone" db:"director_phone"`
	ProcessType     *string `json:"processType" db:"process_type"`
	Category        *string `json:"category" db:"category"`
	CalculateMethod *string `json:"calculateMethod" db:"calculate_method"`
	Remark          *string `json:"remark" db:"remark"`
	CreateTime      *string `json:"createTime" db:"create_time"`
	CreateId        *int64  `json:"createId" db:"create_id"`
	Status          *string `json:"status" db:"status"`
	TenantId        *string `json:"tenantId" db:"tenant_id"`
	UpdateId        *int64  `json:"updateId" db:"update_id"`
	UpdateTime      *string `json:"updateTime" db:"update_time"`

	EmptyField *[]string    `json:"emptyField" db:"-"`
	FileList   *[]MinioFile `json:"fileList" db:"-"`
}

type ProcessRoute struct {
	ID               *string `json:"id" db:"id" id_type:"UUID"`
	Name             *string `json:"name" db:"name"`
	Code             *string `json:"code" db:"code"`
	ParentId         *string `json:"parentId" db:"parent_id"`
	TimeUnit         *string `json:"timeUnit" db:"time_unit"`
	CreateTime       *string `json:"createTime" db:"create_time"`
	CreateId         *int64  `json:"createId" db:"create_id"`
	Status           *string `json:"status" db:"status"`
	Remark           *string `json:"remark" db:"remark"`
	Version          *string `json:"version" db:"version"`
	InspectProgramId *string `json:"inspectProgramId" db:"inspect_program_id"`
	TenantId         *string `json:"tenantId" db:"tenant_id"`
	UpdateId         *int64  `json:"updateId" db:"update_id"`
	UpdateTime       *string `json:"updateTime" db:"update_time"`

	EmptyField     *[]string              `json:"emptyField" db:"-"`
	FileList       *[]MinioFile           `json:"fileList" db:"-"`
	IsHaveHistory  *bool                  `json:"isHaveHistory" db:"-"`
	DetailList     *[]ProcessRouteDetail  `json:"detailList" db:"-"`
	InspectProgram *QualityInspectProgram `json:"inspectProgram" db:"-"`
}

type ProcessRouteDetail struct {
	ID              *string   `json:"id" db:"id" id_type:"UUID"`
	RouteId         *string   `json:"routeId" db:"route_id"`
	StageId         *string   `json:"stageId" db:"stage_id"`
	OrderNum        *int32    `json:"orderNum" db:"order_num"`
	ReadyTimeHour   *float64  `json:"readyTimeHour" db:"ready_time_hour"`
	ProcessNum      *float64  `json:"processNum" db:"process_num"`
	ProcessTimeHour *float64  `json:"processTimeHour" db:"process_time_hour"`
	MoveNum         *float64  `json:"moveNum" db:"move_num"`
	MoveTimeHour    *float64  `json:"moveTimeHour" db:"move_time_hour"`
	IsReview        *bool     `json:"isReview" db:"is_review"`
	IsReport        *bool     `json:"isReport" db:"is_report"`
	IsRound         *bool     `json:"isRound" db:"is_round"`
	Remark          *string   `json:"remark" db:"remark"`
	DeviceIdList    *string `json:"deviceList" db:"device_list"`

	ProcessStage *ProcessStage `json:"stage" db:"-"`
}
