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

package om

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

/******************************************************************************
 *
 * @Struct Name              : WorkOrderStatusRecLst
 *-----------------------------------------------------------------------------
 *
 * @Description              : WorkOrderStatusRecLst的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-05-12 09:59:40
 *
 ******************************************************************************/
type WorkOrderStatusRecLst struct {
	PlantNr              int           `xorm:"pk int 'PlantNr'" json:"OM_WorkOrderStatusRecLst-PlantNr"`
	WorkOrderId          string        `xorm:"pk nvarchar(40) 'WorkOrderId'" json:"OM_WorkOrderStatusRecLst-WorkOrderId"`
	Pos                  int           `xorm:"pk int 'Pos' autoincr" json:"OM_WorkOrderStatusRecLst-Pos"`
	PrevStatus           int           `xorm:"int 'PrevStatus' not null" json:"OM_WorkOrderStatusRecLst-PrevStatus"`
	Status               int           `xorm:"int 'Status' not null" json:"OM_WorkOrderStatusRecLst-Status"`
	StartTime            grmi.DateTime `xorm:"datetime 'StartTime'" json:"OM_WorkOrderStatusRecLst-StartTime"`
	EndTime              grmi.DateTime `xorm:"datetime 'EndTime'" json:"OM_WorkOrderStatusRecLst-EndTime"`
	TriggerEvent         string        `xorm:"nvarchar(40) 'TriggerEvent' not null" json:"OM_WorkOrderStatusRecLst-TriggerEvent"`
	TriggerObjectId      string        `xorm:"nvarchar(40) 'TriggerObjectId' not null" json:"OM_WorkOrderStatusRecLst-TriggerObjectId"`
	TriggerSubObjectId   string        `xorm:"nvarchar(40) 'TriggerSubObjectId' not null" json:"OM_WorkOrderStatusRecLst-TriggerSubObjectId"`
	OutputStatus         int           `xorm:"int 'OutputStatus' not null" json:"OM_WorkOrderStatusRecLst-OutputStatus"`
	OutputEvent          string        `xorm:"nvarchar(40) 'OutputEvent' not null" json:"OM_WorkOrderStatusRecLst-OutputEvent"`
	OutputEventMessageId string        `xorm:"nvarchar(40) 'OutputEventMessageId' not null" json:"OM_WorkOrderStatusRecLst-OutputEventMessageId"`
	OutputObjectId       string        `xorm:"nvarchar(40) 'OutputObjectId' not null" json:"OM_WorkOrderStatusRecLst-OutputObjectId"`
	OutputSubObjectId    string        `xorm:"nvarchar(40) 'OutputSubObjectId' not null" json:"OM_WorkOrderStatusRecLst-OutputSubObjectId"`
	Remark1              string        `xorm:"nvarchar(100) 'Remark1' not null" json:"OM_WorkOrderStatusRecLst-Remark1"`
	Remark2              string        `xorm:"nvarchar(100) 'Remark2' not null" json:"OM_WorkOrderStatusRecLst-Remark2"`
	OutputErrNum         int           `xorm:"int 'OutputErrNum' not null" json:"OM_WorkOrderStatusRecLst-OutputErrNum"`
	LastModify           grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"OM_WorkOrderStatusRecLst-LastModify"`
	LastUser             string        `xorm:"nvarchar(20) 'LastUser' not null" json:"OM_WorkOrderStatusRecLst-LastUser"`
	CreateTime           grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"OM_WorkOrderStatusRecLst-CreateTime"`
}

/******************************************************************************
 *
 * @Function Name            : GetKey
 *-----------------------------------------------------------------------------
 *
 * @Description              : 获取实体的主键
 *
 * @Return Value             : 实体的主键
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-05-12 09:59:40
 *
 ******************************************************************************/
func (self *WorkOrderStatusRecLst) GetKey() core.PK {
	return core.PK{self.PlantNr, self.WorkOrderId, self.Pos}
}
