// 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              : WorkOrderIdentifyRuleDetail
 *-----------------------------------------------------------------------------
 *
 * @Description              : WorkOrderIdentifyRuleDetail的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-11-30 14:27:09
 *
 ******************************************************************************/
type WorkOrderIdentifyRuleDetail struct {
	PlantNr                int           `xorm:"pk int 'PlantNr'" json:"WorkOrderIdentifyRuleDetail-PlantNr"`
	CollerationBasis       string        `xorm:"pk nvarchar(30) 'CollerationBasis'" json:"WorkOrderIdentifyRuleDetail-CollerationBasis"`
	CollerationOperationId int           `xorm:"pk int 'CollerationOperationId'" json:"WorkOrderIdentifyRuleDetail-CollerationOperationId"`
	IdentifyRuleId         int           `xorm:"pk int 'IdentifyRuleId'" json:"WorkOrderIdentifyRuleDetail-IdentifyRuleId"`
	PO                     string        `xorm:"nvarchar(40) 'PO' not null" json:"WorkOrderIdentifyRuleDetail-PO"`
	OpenPlan               int           `xorm:"int 'OpenPlan' not null" json:"WorkOrderIdentifyRuleDetail-OpenPlan"`
	IdentifyPlan           int           `xorm:"int 'IdentifyPlan' not null" json:"WorkOrderIdentifyRuleDetail-IdentifyPlan"`
	CombinePlan            int           `xorm:"int 'CombinePlan' not null" json:"WorkOrderIdentifyRuleDetail-CombinePlan"`
	CollerationRuleId      int           `xorm:"int 'CollerationRuleId' not null" json:"WorkOrderIdentifyRuleDetail-CollerationRuleId"`
	MapBy                  string        `xorm:"nvarchar(20) 'MapBy' not null" json:"WorkOrderIdentifyRuleDetail-MapBy"`
	StartCheckPos          int           `xorm:"int 'StartCheckPos' not null" json:"WorkOrderIdentifyRuleDetail-StartCheckPos"`
	CheckLength            int           `xorm:"int 'CheckLength' not null" json:"WorkOrderIdentifyRuleDetail-CheckLength"`
	Formula                string        `xorm:"nvarchar(40) 'Formula' not null" json:"WorkOrderIdentifyRuleDetail-Formula"`
	OperatorSimbol         string        `xorm:"nvarchar(4) 'OperatorSimbol' not null" json:"WorkOrderIdentifyRuleDetail-OperatorSimbol"`
	CheckObject            string        `xorm:"nvarchar(40) 'CheckObject' not null" json:"WorkOrderIdentifyRuleDetail-CheckObject"`
	AssociatedObject       string        `xorm:"nvarchar(30) 'AssociatedObject' not null" json:"WorkOrderIdentifyRuleDetail-AssociatedObject"`
	AssociatedAttrCode     int           `xorm:"int 'AssociatedAttrCode' not null" json:"WorkOrderIdentifyRuleDetail-AssociatedAttrCode"`
	AssociatedAttrValue    string        `xorm:"nvarchar(30) 'AssociatedAttrValue' not null" json:"WorkOrderIdentifyRuleDetail-AssociatedAttrValue"`
	AssociatedProjectId    string        `xorm:"nvarchar(30) 'AssociatedProjectId' not null" json:"WorkOrderIdentifyRuleDetail-AssociatedProjectId"`
	LastModify             grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"WorkOrderIdentifyRuleDetail-LastModify"`
	LastUser               string        `xorm:"nvarchar(20) 'LastUser' not null" json:"WorkOrderIdentifyRuleDetail-LastUser"`
	CreateTime             grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"WorkOrderIdentifyRuleDetail-CreateTime"`
}

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