package models

type QualityInspectProgram struct {
	ID            *string `json:"id" db:"id" id_type:"UUID"`
	Name          *string `json:"name" db:"name"`
	Code          *string `json:"code" db:"code"`
	InspectUserId *int64  `json:"inspectUserId" db:"inspect_user_id"`
	ReviewUserId  *int64  `json:"reviewUserId" db:"review_user_id"`
	Type          *string `json:"type" db:"type"`
	ReviewStatus  *string `json:"reviewStatus" db:"review_status"`
	ReviewTime    *string `json:"reviewTime" db:"review_time"`
	ReviewReason  *string `json:"reviewReason" db:"review_reason"`
	Remark        *string `json:"remark" db:"remark"`
	CreateTime    *string `json:"createTime" db:"create_time"`
	SampleRate    *int32  `json:"sampleRate" db:"sample_rate"`
	PassedRate    *int32  `json:"passedRate" db:"passed_rate"`
	TenantId      *string `json:"tenantId" db:"tenant_id"`
	CreateId      *int64  `json:"createId" db:"create_id"`
	UpdateId      *int64  `json:"updateId" db:"update_id"`
	UpdateTime    *string `json:"updateTime" db:"update_time"`

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

type ProductMaterial struct {
	ID            *string  `json:"id" db:"id" id_type:"UUID"`
	Name          *string  `json:"name" db:"name"`
	Code          *string  `json:"code" db:"code"`
	Unit          *string  `json:"unit" db:"unit"`
	Specification *string  `json:"specification" db:"specification"`
	NeedType      *string  `json:"needType" db:"need_type"`
	MaterialType  *string  `json:"materialType" db:"material_type"`
	Status        *string  `json:"status" db:"status"`
	WarehouseId   *string  `json:"warehouseId" db:"warehouse_id"`
	Price         *float64 `json:"price" db:"price"`
	Remark        *string  `json:"remark" db:"remark"`
	CreateId      *int64   `json:"createId" db:"create_id"`
	CreateTime    *string  `json:"createTime" db:"create_time"`
	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:"-"`
}

type ProductBom struct {
	ID           *string  `json:"id" db:"id" id_type:"UUID"`
	MaterialCode *string  `json:"materialCode" db:"material_code"`
	MaterialName *string  `json:"materialName" db:"material_name"`
	CreateId     *int64   `json:"createId" db:"create_id"`
	CreateTime   *string  `json:"createTime" db:"create_time"`
	Status       *string  `json:"status" db:"status"`
	Remark       *string  `json:"remark" db:"remark"`
	BomCode      *string  `json:"bomCode" db:"bom_code"`
	ParentId     *string  `json:"parentId" db:"parent_id"`
	Quantity     *float64 `json:"quantity" db:"quantity"`
	TenantId     *string  `json:"tenantId" db:"tenant_id"`
	UpdateId     *int64   `json:"updateId" db:"update_id"`
	UpdateTime   *string  `json:"updateTime" db:"update_time"`
	RouteId      *string  `json:"routeId" db:"route_id"`
	RouteName    *string  `json:"routeName" db:"-"`

	EmptyField            *[]string            `json:"emptyField" db:"-"`
	Material              *ProductMaterial     `json:"material" db:"-"`
	ChildrenList          *[]ProductBom        `json:"childrenList" db:"-"`
	IsHaveChildren        *bool                `json:"isHaveChildren" db:"-"`
	WarehouseMaterialList *[]WarehouseMaterial `json:"warehouseMaterialList" db:"-"`
}

type Customer struct {
	ID           *string `json:"id" db:"id" id_type:"UUID"`
	Name         *string `json:"name" db:"name"`
	Code         *string `json:"code" db:"code"`
	CreditNo     *string `json:"creditNo" db:"credit_no"`
	Address      *string `json:"address" db:"address"`
	Type         *string `json:"type" db:"type"`
	CustomerType *string `json:"customerType" db:"customer_type"`
	Phone        *string `json:"phone" db:"phone"`
	CreateTime   *string `json:"createTime" db:"create_time"`
	ManagerName  *string `json:"managerName" db:"manager_name"`
	ManagerPhone *string `json:"managerPhone" db:"manager_phone"`
	Status       *string `json:"status" db:"status"`
	Email        *string `json:"email" db:"email"`
	CreditLevel  *string `json:"creditLevel" db:"credit_level"`
	ValueLevel   *string `json:"valueLevel" db:"value_level"`
	TenantId     *string `json:"tenantId" db:"tenant_id"`
	CreateId     *int64  `json:"createId" db:"create_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 Device struct {
	ID         *string `json:"id" db:"id" id_type:"UUID"`
	Name       *string `json:"name" db:"name"`
	Code       *string `json:"code" db:"code"`
	Remark     *string `json:"remark" db:"remark"`
	CreateTime *string `json:"createTime" db:"create_time"`
	TenantId   *string `json:"tenantId" db:"tenant_id"`

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