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

package pln

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

/******************************************************************************
 *
 * @Struct Name              : CustOrderStatusHistory
 *-----------------------------------------------------------------------------
 *
 * @Description              : CustOrderStatusHistory的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-10-22 13:50:40
 *
 ******************************************************************************/
type CustOrderStatusHistory struct {
	PlantNr          int           `xorm:"pk int 'PlantNr'" json:"PLN_CustOrderStatusHistory-PlantNr"`
	CustOrderId      string        `xorm:"pk nvarchar(40) 'CustOrderId'" json:"PLN_CustOrderStatusHistory-CustOrderId"`
	Pos              int           `xorm:"pk bigint 'Pos' autoincr" json:"PLN_CustOrderStatusHistory-Pos"`
	StatusChangeType string        `xorm:"nvarchar(20) 'StatusChangeType' not null" json:"PLN_CustOrderStatusHistory-StatusChangeType"`
	FromStatus       int           `xorm:"int 'FromStatus' not null" json:"PLN_CustOrderStatusHistory-FromStatus"`
	ToStatus         int           `xorm:"int 'ToStatus' not null" json:"PLN_CustOrderStatusHistory-ToStatus"`
	TriggerEvent     string        `xorm:"nvarchar(40) 'TriggerEvent' not null" json:"PLN_CustOrderStatusHistory-TriggerEvent"`
	TriggerObjId     string        `xorm:"nvarchar(40) 'TriggerObjId' not null" json:"PLN_CustOrderStatusHistory-TriggerObjId"`
	ChangeTime       grmi.DateTime `xorm:"datetime 'ChangeTime' not null" json:"PLN_CustOrderStatusHistory-ChangeTime"`
	TriggerPara1     string        `xorm:"nvarchar(40) 'TriggerPara1' not null" json:"PLN_CustOrderStatusHistory-TriggerPara1"`
	TriggerPara2     string        `xorm:"nvarchar(40) 'TriggerPara2' not null" json:"PLN_CustOrderStatusHistory-TriggerPara2"`
	LastModify       grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"PLN_CustOrderStatusHistory-LastModify"`
	LastUser         string        `xorm:"nvarchar(20) 'LastUser' not null" json:"PLN_CustOrderStatusHistory-LastUser"`
	CreateTime       grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"PLN_CustOrderStatusHistory-CreateTime"`
}

/******************************************************************************
 *
 * @Function Name            : GetKey
 *-----------------------------------------------------------------------------
 *
 * @Description              : 获取实体的主键
 *
 * @Return Value             : 实体的主键
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-10-22 13:50:40
 *
 ******************************************************************************/
func (self *CustOrderStatusHistory) GetKey() core.PK {
	return core.PK{self.PlantNr, self.CustOrderId, self.Pos}
}
