// 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              : ShipOrder
 *-----------------------------------------------------------------------------
 *
 * @Description              : ShipOrder的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-10-19 10:26:40
 *
 ******************************************************************************/
type ShipOrder struct {
	PlantNr            int                        `xorm:"pk int 'PlantNr'" json:"JIT_ShipOrder-PlantNr"`
	ShipOrderId        string                     `xorm:"pk nvarchar(40) 'ShipOrderId'" json:"JIT_ShipOrder-ShipOrderId"`
	ShipTemplateId     string                     `xorm:"nvarchar(40) 'ShipTemplateId' not null" json:"JIT_ShipOrder-ShipTemplateId"`
	ProjectId          string                     `xorm:"nvarchar(40) 'ProjectId' not null" json:"JIT_ShipOrder-ProjectId"`
	ShipType           string                     `xorm:"nvarchar(20) 'ShipType' not null" json:"JIT_ShipOrder-ShipType"`
	OrderInfo          string                     `xorm:"nvarchar(100) 'OrderInfo' not null" json:"JIT_ShipOrder-OrderInfo"`
	PrinterId          string                     `xorm:"nvarchar(40) 'PrinterId' not null" json:"JIT_ShipOrder-PrinterId"`
	TemplateFile       string                     `xorm:"nvarchar(100) 'TemplateFile' not null" json:"JIT_ShipOrder-TemplateFile"`
	PlanQty            int                        `xorm:"int 'PlanQty' not null" json:"JIT_ShipOrder-PlanQty"`
	ActQty             int                        `xorm:"int 'ActQty' not null" json:"JIT_ShipOrder-ActQty"`
	OpenTime           grmi.DateTime              `xorm:"datetime 'OpenTime' not null" json:"JIT_ShipOrder-OpenTime"`
	CloseTime          grmi.DateTime              `xorm:"datetime 'CloseTime' not null" json:"JIT_ShipOrder-CloseTime"`
	Operator           string                     `xorm:"nvarchar(20) 'Operator' not null" json:"JIT_ShipOrder-Operator"`
	FormalShipOrderId  string                     `xorm:"nvarchar(40) 'FormalShipOrderId'" json:"JIT_ShipOrder-FormalShipOrderId"`
	SourceId           string                     `xorm:"nvarchar(40) 'SourceId'" json:"JIT_ShipOrder-SourceId"`
	PlateNumber        string                     `xorm:"nvarchar(40) 'PlateNumber'" json:"JIT_ShipOrder-PlateNumber"`
	CheckCarSet        bool                       `xorm:"bit 'CheckCarSet' not null" json:"JIT_ShipOrder-CheckCarSet"`
	CtrlPara1          int                        `xorm:"int 'CtrlPara1' not null" json:"JIT_ShipOrder-CtrlPara1"`
	CtrlPara2          int                        `xorm:"int 'CtrlPara2' not null" json:"JIT_ShipOrder-CtrlPara2"`
	CtrlStr1           string                     `xorm:"nvarchar(255) 'CtrlStr1' not null" json:"JIT_ShipOrder-CtrlStr1"`
	CtrlStr2           string                     `xorm:"nvarchar(255) 'CtrlStr2' not null" json:"JIT_ShipOrder-CtrlStr2"`
	CtrlTime1          grmi.DateTime              `xorm:"datetime 'CtrlTime1' not null" json:"JIT_ShipOrder-CtrlTime1"`
	CtrlTime2          grmi.DateTime              `xorm:"datetime 'CtrlTime2' not null" json:"JIT_ShipOrder-CtrlTime2"`
	LastModify         grmi.DateTime              `xorm:"datetime 'LastModify' not null updated" json:"JIT_ShipOrder-LastModify"`
	LastUser           string                     `xorm:"nvarchar(20) 'LastUser' not null" json:"JIT_ShipOrder-LastUser"`
	CreateTime         grmi.DateTime              `xorm:"datetime 'CreateTime' not null created" json:"JIT_ShipOrder-CreateTime"`
	ShipOrderStatus    ShipOrderStatus            `xorm:"-" json:"JIT_ShipOrder-ShipOrderStatus"`
	ShipOrderItemLstLi []ShipOrderItemLst         `xorm:"-" json:"JIT_ShipOrder-ShipOrderItemLstLi"`
	ShipOrderDataLstLi []ShipOrderDataLst         `xorm:"-" json:"JIT_ShipOrder-ShipOrderDataLstLi"`
	ItemDataLi         []ShipOrderItemLstWithData `xorm:"-" json:"JIT_ShipOrder-ItemDataLi"`
}

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