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

package jit

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

/******************************************************************************
 *
 * @Struct Name              : PackOrder
 *-----------------------------------------------------------------------------
 *
 * @Description              : PackOrder的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-10-19 10:26:40
 *
 ******************************************************************************/
type PackOrder struct {
	PlantNr            int                `xorm:"pk int 'PlantNr'" json:"JIT_PackOrder-PlantNr"`
	PackOrderId        string             `xorm:"pk nvarchar(40) 'PackOrderId'" json:"JIT_PackOrder-PackOrderId"`
	PackTemplateId     string             `xorm:"nvarchar(40) 'PackTemplateId' not null" json:"JIT_PackOrder-PackTemplateId"`
	ProjectId          string             `xorm:"nvarchar(40) 'ProjectId' not null" json:"JIT_PackOrder-ProjectId"`
	ShortPackToggle    bool               `xorm:"bit 'ShortPackToggle' not null" json:"JIT_PackOrder-ShortPackToggle"`
	ShortBy            string             `xorm:"nvarchar(20) 'ShortBy' not null" json:"JIT_PackOrder-ShortBy"`
	ShortTime          grmi.DateTime      `xorm:"datetime 'ShortTime' not null" json:"JIT_PackOrder-ShortTime"`
	OrderInfo          string             `xorm:"nvarchar(100) 'OrderInfo' not null" json:"JIT_PackOrder-OrderInfo"`
	SyncSnrId          string             `xorm:"nvarchar(40) 'SyncSnrId' not null" json:"JIT_PackOrder-SyncSnrId"`
	BoxSnrId           string             `xorm:"nvarchar(40) 'BoxSnrId' not null" json:"JIT_PackOrder-BoxSnrId"`
	PackTypeId         string             `xorm:"nvarchar(40) 'PackTypeId' not null" json:"JIT_PackOrder-PackTypeId"`
	PrinterId          string             `xorm:"nvarchar(40) 'PrinterId' not null" json:"JIT_PackOrder-PrinterId"`
	TemplateFile       string             `xorm:"nvarchar(100) 'TemplateFile' not null" json:"JIT_PackOrder-TemplateFile"`
	PlanQty            int                `xorm:"int 'PlanQty' not null" json:"JIT_PackOrder-PlanQty"`
	ActQty             int                `xorm:"int 'ActQty' not null" json:"JIT_PackOrder-ActQty"`
	OpenTime           grmi.DateTime      `xorm:"datetime 'OpenTime' not null" json:"JIT_PackOrder-OpenTime"`
	CloseTime          grmi.DateTime      `xorm:"datetime 'CloseTime' not null" json:"JIT_PackOrder-CloseTime"`
	Operator           string             `xorm:"nvarchar(20) 'Operator' not null" json:"JIT_PackOrder-Operator"`
	CheckSyncKey       bool               `xorm:"bit 'CheckSyncKey' not null" json:"JIT_PackOrder-CheckSyncKey"`
	PackLocation       string             `xorm:"nvarchar(40) 'PackLocation' not null" json:"JIT_PackOrder-PackLocation"`
	RFID               string             `xorm:"nvarchar(50) 'RFID' not null" json:"JIT_PackOrder-RFID"`
	CtrlPara1          int                `xorm:"int 'CtrlPara1' not null" json:"JIT_PackOrder-CtrlPara1"`
	CtrlPara2          int                `xorm:"int 'CtrlPara2' not null" json:"JIT_PackOrder-CtrlPara2"`
	CtrlStr1           string             `xorm:"nvarchar(255) 'CtrlStr1' not null" json:"JIT_PackOrder-CtrlStr1"`
	CtrlStr2           string             `xorm:"nvarchar(255) 'CtrlStr2' not null" json:"JIT_PackOrder-CtrlStr2"`
	CtrlTime1          grmi.DateTime      `xorm:"datetime 'CtrlTime1' not null" json:"JIT_PackOrder-CtrlTime1"`
	CtrlTime2          grmi.DateTime      `xorm:"datetime 'CtrlTime2' not null" json:"JIT_PackOrder-CtrlTime2"`
	LastModify         grmi.DateTime      `xorm:"datetime 'LastModify' not null updated" json:"JIT_PackOrder-LastModify"`
	LastUser           string             `xorm:"nvarchar(20) 'LastUser' not null" json:"JIT_PackOrder-LastUser"`
	CreateTime         grmi.DateTime      `xorm:"datetime 'CreateTime' not null created" json:"JIT_PackOrder-CreateTime"`
	PackOrderItemLstLi []PackOrderItemLst `xorm:"-" json:"JIT_PackOrder-PackOrderItemLstLi"`
	PackOrderStatus    PackOrderStatus    `xorm:"-" json:"JIT_PackOrder-PackOrderStatus"`
}

/******************************************************************************
 *
 * @Function Name            : GetKey
 *-----------------------------------------------------------------------------
 *
 * @Description              : 获取实体的主键
 *
 * @Return Value             : 实体的主键
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-10-19 10:26:40
 *
 ******************************************************************************/
func (self *PackOrder) GetKey() core.PK {
	return core.PK{self.PlantNr, self.PackOrderId}
}
