// 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              : SerialOrderStatusRecLst
 *-----------------------------------------------------------------------------
 *
 * @Description              : SerialOrderStatusRecLst的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-07-08 10:08:33
 *
 ******************************************************************************/
type SerialOrderStatusRecLst struct {
	PlantNr              int           `xorm:"pk int 'PlantNr'" json:"OM_SerialOrderStatusRecLst-PlantNr"`
	SerialOrderId        string        `xorm:"pk nvarchar(40) 'SerialOrderId'" json:"OM_SerialOrderStatusRecLst-SerialOrderId"`
	Pos                  int           `xorm:"pk int 'Pos' autoincr" json:"OM_SerialOrderStatusRecLst-Pos"`
	PrevStatus           int           `xorm:"int 'PrevStatus' not null" json:"OM_SerialOrderStatusRecLst-PrevStatus"`
	Status               int           `xorm:"int 'Status' not null" json:"OM_SerialOrderStatusRecLst-Status"`
	StartTime            grmi.DateTime `xorm:"datetime 'StartTime'" json:"OM_SerialOrderStatusRecLst-StartTime"`
	EndTime              grmi.DateTime `xorm:"datetime 'EndTime'" json:"OM_SerialOrderStatusRecLst-EndTime"`
	TriggerEvent         string        `xorm:"nvarchar(40) 'TriggerEvent' not null" json:"OM_SerialOrderStatusRecLst-TriggerEvent"`
	TriggerObjectId      string        `xorm:"nvarchar(40) 'TriggerObjectId' not null" json:"OM_SerialOrderStatusRecLst-TriggerObjectId"`
	TriggerSubObjectId   string        `xorm:"nvarchar(40) 'TriggerSubObjectId' not null" json:"OM_SerialOrderStatusRecLst-TriggerSubObjectId"`
	OutputStatus         int           `xorm:"int 'OutputStatus' not null" json:"OM_SerialOrderStatusRecLst-OutputStatus"`
	OutputEvent          string        `xorm:"nvarchar(40) 'OutputEvent' not null" json:"OM_SerialOrderStatusRecLst-OutputEvent"`
	OutputEventMessageId string        `xorm:"nvarchar(40) 'OutputEventMessageId' not null" json:"OM_SerialOrderStatusRecLst-OutputEventMessageId"`
	OutputObjectId       string        `xorm:"nvarchar(40) 'OutputObjectId' not null" json:"OM_SerialOrderStatusRecLst-OutputObjectId"`
	OutputSubObjectId    string        `xorm:"nvarchar(40) 'OutputSubObjectId' not null" json:"OM_SerialOrderStatusRecLst-OutputSubObjectId"`
	Remark1              string        `xorm:"nvarchar(100) 'Remark1' not null" json:"OM_SerialOrderStatusRecLst-Remark1"`
	Remark2              string        `xorm:"nvarchar(100) 'Remark2' not null" json:"OM_SerialOrderStatusRecLst-Remark2"`
	OutputErrNum         int           `xorm:"int 'OutputErrNum' not null" json:"OM_SerialOrderStatusRecLst-OutputErrNum"`
	LastModify           grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"OM_SerialOrderStatusRecLst-LastModify"`
	LastUser             string        `xorm:"nvarchar(20) 'LastUser' not null" json:"OM_SerialOrderStatusRecLst-LastUser"`
	CreateTime           grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"OM_SerialOrderStatusRecLst-CreateTime"`
}

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