// 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              : WorkOrderIdentifyRule
 *-----------------------------------------------------------------------------
 *
 * @Description              : WorkOrderIdentifyRule的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-11-30 14:27:09
 *
 ******************************************************************************/
type WorkOrderIdentifyRule struct {
	PlantNr                int           `xorm:"pk int 'PlantNr'" json:"WorkOrderIdentifyRule-PlantNr"`
	CollerationBasis       string        `xorm:"pk nvarchar(50) 'CollerationBasis'" json:"WorkOrderIdentifyRule-CollerationBasis"`
	CollerationOperationId int           `xorm:"pk int 'CollerationOperationId'" json:"WorkOrderIdentifyRule-CollerationOperationId"`
	PO                     string        `xorm:"nvarchar(40) 'PO' not null" json:"WorkOrderIdentifyRule-PO"`
	OpenPlan               int           `xorm:"int 'OpenPlan' not null" json:"WorkOrderIdentifyRule-OpenPlan"`
	IdentifyPlan           int           `xorm:"int 'IdentifyPlan' not null" json:"WorkOrderIdentifyRule-IdentifyPlan"`
	CombinePlan            int           `xorm:"int 'CombinePlan' not null" json:"WorkOrderIdentifyRule-CombinePlan"`
	CollerationStepDesc    string        `xorm:"nvarchar(200) 'CollerationStepDesc' not null" json:"WorkOrderIdentifyRule-CollerationStepDesc"`
	LastModify             grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"WorkOrderIdentifyRule-LastModify"`
	LastUser               string        `xorm:"nvarchar(20) 'LastUser' not null" json:"WorkOrderIdentifyRule-LastUser"`
	CreateTime             grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"WorkOrderIdentifyRule-CreateTime"`
	WorkOrderIdentifyRuleDetailLi []WorkOrderIdentifyRuleDetail `xorm:"-" json:"WorkOrderIdentifyRule-WorkOrderIdentifyRuleDetailLi"`
}

/******************************************************************************
 *
 * @Function Name            : GetKey
 *-----------------------------------------------------------------------------
 *
 * @Description              : 获取实体的主键
 *
 * @Return Value             : 实体的主键
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-11-30 14:27:09
 *
 ******************************************************************************/
func (self *WorkOrderIdentifyRule) GetKey() core.PK {
	return core.PK{self.PlantNr, self.CollerationBasis, self.CollerationOperationId}
}
