// 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              : Operation
 *-----------------------------------------------------------------------------
 *
 * @Description              : Operation的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-08-11 10:00:53
 *
 ******************************************************************************/
type Operation struct {
	PlantNr            int           `xorm:"pk int 'PlantNr'" json:"Operation-PlantNr"`
	OperationId        int           `xorm:"pk int 'OperationId' autoincr" json:"Operation-OperationId"`
	PO                 int           `xorm:"int 'PO' not null" json:"Operation-PO"`
	StepNo             int           `xorm:"int 'StepNo' not null" json:"Operation-StepNo"`
	StepDesc           string        `xorm:"nvarchar(200) 'StepDesc' not null" json:"Operation-StepDesc"`
	ProjectId          string        `xorm:"nvarchar(40) 'ProjectId' not null" json:"Operation-ProjectId"`
	WorkLineId         string        `xorm:"nvarchar(40) 'WorkLineId' not null" json:"Operation-WorkLineId"`
	ActivateInStation  bool          `xorm:"bit 'ActivateInStation' not null" json:"Operation-ActivateInStation"`
	ActivateWhenRepair bool          `xorm:"bit 'ActivateWhenRepair' not null" json:"Operation-ActivateWhenRepair"`
	AttrCode           int           `xorm:"int 'AttrCode' not null" json:"Operation-AttrCode"`
	AttrValue          string        `xorm:"nvarchar(100) 'AttrValue' not null" json:"Operation-AttrValue"`
	StepType           string        `xorm:"nvarchar(40) 'StepType' not null" json:"Operation-StepType"`
	OPCtrlPara1        string        `xorm:"nvarchar(40) 'OPCtrlPara1' not null" json:"Operation-OPCtrlPara1"`
	OPCtrlPara2        string        `xorm:"nvarchar(40) 'OPCtrlPara2' not null" json:"Operation-OPCtrlPara2"`
	OPCtrlPara3        int           `xorm:"int 'OPCtrlPara3' not null" json:"Operation-OPCtrlPara3"`
	OPCtrlPara4        int           `xorm:"int 'OPCtrlPara4' not null" json:"Operation-OPCtrlPara4"`
	OPCtrlPara5        float64       `xorm:"float 'OPCtrlPara5' not null" json:"Operation-OPCtrlPara5"`
	OPCtrlPara6        float64       `xorm:"float 'OPCtrlPara6' not null" json:"Operation-OPCtrlPara6"`
	LastModify         grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"Operation-LastModify"`
	LastUser           string        `xorm:"nvarchar(20) 'LastUser' not null" json:"Operation-LastUser"`
	CreateTime         grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"Operation-CreateTime"`
}

/******************************************************************************
 *
 * @Function Name            : GetKey
 *-----------------------------------------------------------------------------
 *
 * @Description              : 获取实体的主键
 *
 * @Return Value             : 实体的主键
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-08-11 10:00:53
 *
 ******************************************************************************/
func (self *Operation) GetKey() core.PK {
	return core.PK{self.PlantNr, self.OperationId}
}
