// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved.

package base

import (
	"LAPP_ACURA_MOM_BACKEND/grmi"
	"xorm.io/core"
)

/******************************************************************************
 *
 * @Struct Name              : CrossPlanTaskHead
 *-----------------------------------------------------------------------------
 *
 * @Description              : CrossPlanTaskHead的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2022-05-27 14:50:41
 *
 ******************************************************************************/
type CrossPlanTaskHead struct {
	TaskNr                int                   `xorm:"pk int 'TaskNr' autoincr" json:"CrossPlanTaskHead-TaskNr"`
	FromPlantNr           int                   `xorm:"int 'FromPlantNr' not null" json:"CrossPlanTaskHead-FromPlantNr"`
	ToPlantNr             int                   `xorm:"int 'ToPlantNr' not null" json:"CrossPlanTaskHead-ToPlantNr"`
	ArtId                 string                `xorm:"nvarchar(255) 'ArtId' not null" json:"CrossPlanTaskHead-ArtId"`
	PlanQty               int                   `xorm:"int 'PlanQty' not null" json:"CrossPlanTaskHead-PlanQty"`
	ActQty                int                   `xorm:"int 'ActQty' not null" json:"CrossPlanTaskHead-ActQty"`
	Status                int                   `xorm:"int 'Status' not null" json:"CrossPlanTaskHead-Status"`
	OrderType             string                `xorm:"nvarchar(40) 'OrderType' not null" json:"CrossPlanTaskHead-OrderType"`
	PlanType              string                `xorm:"nvarchar(40) 'PlanType' not null" json:"CrossPlanTaskHead-PlanType"`
	SchedType             string                `xorm:"nvarchar(255) 'SchedType' not null" json:"CrossPlanTaskHead-SchedType"`
	BusinessObjType       string                `xorm:"nvarchar(40) 'BusinessObjType' not null" json:"CrossPlanTaskHead-BusinessObjType"`
	BusinessObjId         string                `xorm:"nvarchar(40) 'BusinessObjId' not null" json:"CrossPlanTaskHead-BusinessObjId"`
	PlanStartTime         grmi.DateTime         `xorm:"datetime 'PlanStartTime'" json:"CrossPlanTaskHead-PlanStartTime"`
	PlanEndTime           grmi.DateTime         `xorm:"datetime 'PlanEndTime'" json:"CrossPlanTaskHead-PlanEndTime"`
	LastPo                string                `xorm:"nvarchar(40) 'LastPo'" json:"CrossPlanTaskHead-LastPo"`
	ReleaseQty            string                `xorm:"nvarchar(100) 'ReleaseQty'" json:"CrossPlanTaskHead-ReleaseQty"`
	StartTime             grmi.DateTime         `xorm:"datetime 'StartTime'" json:"CrossPlanTaskHead-StartTime"`
	AccomplishTime        grmi.DateTime         `xorm:"datetime 'AccomplishTime'" json:"CrossPlanTaskHead-AccomplishTime"`
	ErrorMsg              string                `xorm:"nvarchar(255) 'ErrorMsg'" json:"CrossPlanTaskHead-ErrorMsg"`
	Priority              int                   `xorm:"int 'Priority'" json:"CrossPlanTaskHead-Priority"`
	ProjectId             string                `xorm:"nvarchar(40) 'ProjectId'" json:"CrossPlanTaskHead-ProjectId"`
	CtrlStr1              string                `xorm:"nvarchar(255) 'CtrlStr1'" json:"CrossPlanTaskHead-CtrlStr1"`
	CtrlStr2              string                `xorm:"nvarchar(255) 'CtrlStr2'" json:"CrossPlanTaskHead-CtrlStr2"`
	CtrlStr3              string                `xorm:"nvarchar(255) 'CtrlStr3'" json:"CrossPlanTaskHead-CtrlStr3"`
	CtrlStr4              string                `xorm:"nvarchar(255) 'CtrlStr4'" json:"CrossPlanTaskHead-CtrlStr4"`
	CtrInt1               int                   `xorm:"int 'CtrInt1'" json:"CrossPlanTaskHead-CtrInt1"`
	CtrInt2               int                   `xorm:"int 'CtrInt2'" json:"CrossPlanTaskHead-CtrInt2"`
	CtrInt3               int                   `xorm:"int 'CtrInt3'" json:"CrossPlanTaskHead-CtrInt3"`
	CtrInt4               int                   `xorm:"int 'CtrInt4'" json:"CrossPlanTaskHead-CtrInt4"`
	LastModify            grmi.DateTime         `xorm:"datetime 'LastModify' not null updated" json:"CrossPlanTaskHead-LastModify"`
	LastUser              string                `xorm:"nvarchar(20) 'LastUser' not null" json:"CrossPlanTaskHead-LastUser"`
	CreateTime            grmi.DateTime         `xorm:"datetime 'CreateTime' not null created" json:"CrossPlanTaskHead-CreateTime"`
	CrossPlanTaskDetailLi []CrossPlanTaskDetail `xorm:"-" json:"CrossPlanTaskHead-CrossPlanTaskDetailLi"`
}

/******************************************************************************
 *
 * @Function Name            : GetKey
 *-----------------------------------------------------------------------------
 *
 * @Description              : 获取实体的主键
 *
 * @Return Value             : 实体的主键
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2022-05-27 14:50:41
 *
 ******************************************************************************/
func (self *CrossPlanTaskHead) GetKey() core.PK {
	return core.PK{self.TaskNr}
}
