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

package base

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

/******************************************************************************
 *
 * @Struct Name              : TightenWrenchRuleInfo
 *-----------------------------------------------------------------------------
 *
 * @Description              : TightenWrenchRuleInfo的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-08-13 16:59:07
 *
 ******************************************************************************/
type TightenWrenchRuleInfo struct {
	PlantNr           int           `xorm:"pk int 'PlantNr'" json:"TightenWrenchRuleInfo-PlantNr"`
	OperationId       int           `xorm:"pk int 'OperationId'" json:"TightenWrenchRuleInfo-OperationId"`
	RuleId            int           `xorm:"pk int 'RuleId'" json:"TightenWrenchRuleInfo-RuleId"`
	WorkPlaceNr       int           `xorm:"pk int 'WorkPlaceNr'" json:"TightenWrenchRuleInfo-WorkPlaceNr"`
	PO                int           `xorm:"int 'PO' not null" json:"TightenWrenchRuleInfo-PO"`
	StepNo            int           `xorm:"int 'StepNo' not null" json:"TightenWrenchRuleInfo-StepNo"`
	StepDesc          string        `xorm:"nvarchar(100) 'StepDesc' not null" json:"TightenWrenchRuleInfo-StepDesc"`
	ProjectId         string        `xorm:"nvarchar(40) 'ProjectId' not null" json:"TightenWrenchRuleInfo-ProjectId"`
	MainControlAction string        `xorm:"nvarchar(20) 'MainControlAction' not null" json:"TightenWrenchRuleInfo-MainControlAction"`
	ControlId         int           `xorm:"int 'ControlId' not null" json:"TightenWrenchRuleInfo-ControlId"`
	ControlTime       int           `xorm:"int 'ControlTime' not null" json:"TightenWrenchRuleInfo-ControlTime"`
	LastModify        grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"TightenWrenchRuleInfo-LastModify"`
	LastUser          string        `xorm:"nvarchar(20) 'LastUser' not null" json:"TightenWrenchRuleInfo-LastUser"`
	CreateTime        grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"TightenWrenchRuleInfo-CreateTime"`
}

/******************************************************************************
 *
 * @Function Name            : GetKey
 *-----------------------------------------------------------------------------
 *
 * @Description              : 获取实体的主键
 *
 * @Return Value             : 实体的主键
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-08-13 16:59:07
 *
 ******************************************************************************/
func (self *TightenWrenchRuleInfo) GetKey() core.PK {
	return core.PK{self.PlantNr, self.OperationId, self.RuleId, self.WorkPlaceNr}
}
