// 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              : OPCMonitorComRule
 *-----------------------------------------------------------------------------
 *
 * @Description              : OPCMonitorComRule的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-11-25 09:48:01
 *
 ******************************************************************************/
type OPCMonitorComRule struct {
	PlantNr                   int                       `xorm:"pk int 'PlantNr'" json:"OPCMonitorComRule-PlantNr"`
	OperationId               int                       `xorm:"pk int 'OperationId'" json:"OPCMonitorComRule-OperationId"`
	WorkPlaceNr               int                       `xorm:"pk int 'WorkPlaceNr'" json:"OPCMonitorComRule-WorkPlaceNr"`
	RuleId                    int                       `xorm:"pk int 'RuleId'" json:"OPCMonitorComRule-RuleId"`
	PO                        string                    `xorm:"nvarchar(40) 'PO' not null" json:"OPCMonitorComRule-PO"`
	StepNo                    int                       `xorm:"int 'StepNo' not null" json:"OPCMonitorComRule-StepNo"`
	StepDesc                  string                    `xorm:"nvarchar(100) 'StepDesc' not null" json:"OPCMonitorComRule-StepDesc"`
	ProjectId                 string                    `xorm:"nvarchar(40) 'ProjectId' not null" json:"OPCMonitorComRule-ProjectId"`
	ActionType                string                    `xorm:"nvarchar(20) 'ActionType' not null" json:"OPCMonitorComRule-ActionType"`
	DBlockAddress             string                    `xorm:"nvarchar(40) 'DBlockAddress' not null" json:"OPCMonitorComRule-DBlockAddress"`
	DBlockValueType           string                    `xorm:"nvarchar(40) 'DBlockValueType' not null" json:"OPCMonitorComRule-DBlockValueType"`
	Formula                   string                    `xorm:"nvarchar(40) 'Formula' not null" json:"OPCMonitorComRule-Formula"`
	OperatorSimbol            string                    `xorm:"nvarchar(40) 'OperatorSimbol' not null" json:"OPCMonitorComRule-OperatorSimbol"`
	DBlockValue               string                    `xorm:"nvarchar(100) 'DBlockValue' not null" json:"OPCMonitorComRule-DBlockValue"`
	OKGotoRuleId              int                       `xorm:"int 'OKGotoRuleId' not null" json:"OPCMonitorComRule-OKGotoRuleId"`
	OKDelay                   int                       `xorm:"int 'OKDelay' not null" json:"OPCMonitorComRule-OKDelay"`
	NOKGotoRuleId             int                       `xorm:"int 'NOKGotoRuleId' not null" json:"OPCMonitorComRule-NOKGotoRuleId"`
	NOKDelay                  int                       `xorm:"int 'NOKDelay' not null" json:"OPCMonitorComRule-NOKDelay"`
	DBlockDesc                string                    `xorm:"nvarchar(100) 'DBlockDesc' not null" json:"OPCMonitorComRule-DBlockDesc"`
	LastModify                grmi.DateTime             `xorm:"datetime 'LastModify' not null updated" json:"OPCMonitorComRule-LastModify"`
	LastUser                  string                    `xorm:"nvarchar(20) 'LastUser' not null" json:"OPCMonitorComRule-LastUser"`
	CreateTime                grmi.DateTime             `xorm:"datetime 'CreateTime' not null created" json:"OPCMonitorComRule-CreateTime"`
	OPCMonitorComDetailRuleLi []OPCMonitorComDetailRule `xorm:"-" json:"OPCMonitorComRule-OPCMonitorComDetailRuleLi"`
}

/******************************************************************************
 *
 * @Function Name            : GetKey
 *-----------------------------------------------------------------------------
 *
 * @Description              : 获取实体的主键
 *
 * @Return Value             : 实体的主键
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-11-25 09:48:01
 *
 ******************************************************************************/
func (self *OPCMonitorComRule) GetKey() core.PK {
	return core.PK{self.PlantNr, self.OperationId, self.WorkPlaceNr, self.RuleId}
}
