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

package log

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

/******************************************************************************
 *
 * @Struct Name              : ArtDemandLstCache
 *-----------------------------------------------------------------------------
 *
 * @Description              : ArtDemandLstCache的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-06-11 16:10:25
 *
 ******************************************************************************/
type ArtDemandLstCache struct {
	PlantNr            int           `xorm:"pk int 'PlantNr'" json:"LOG_ArtDemandLstCache-PlantNr"`
	DemandId           string        `xorm:"pk nvarchar(40) 'DemandId'" json:"LOG_ArtDemandLstCache-DemandId"`
	Pos                int           `xorm:"pk int 'Pos'" json:"LOG_ArtDemandLstCache-Pos"`
	ArtId              string        `xorm:"nvarchar(40) 'ArtId' not null" json:"LOG_ArtDemandLstCache-ArtId"`
	DemandTime         grmi.DateTime `xorm:"datetime2(7) 'DemandTime' not null" json:"LOG_ArtDemandLstCache-DemandTime"`
	DemandYear         int           `xorm:"int 'DemandYear' not null" json:"LOG_ArtDemandLstCache-DemandYear"`
	DemandMonth        int           `xorm:"int 'DemandMonth' not null" json:"LOG_ArtDemandLstCache-DemandMonth"`
	DemandWeek         int           `xorm:"int 'DemandWeek' not null" json:"LOG_ArtDemandLstCache-DemandWeek"`
	DemandDate         grmi.Date     `xorm:"date 'DemandDate' not null" json:"LOG_ArtDemandLstCache-DemandDate"`
	DemandHour         int           `xorm:"int 'DemandHour' not null" json:"LOG_ArtDemandLstCache-DemandHour"`
	DemandQty          float64       `xorm:"float 'DemandQty' not null" json:"LOG_ArtDemandLstCache-DemandQty"`
	QtyUomId           string        `xorm:"nvarchar(40) 'QtyUomId' not null" json:"LOG_ArtDemandLstCache-QtyUomId"`
	DemandObjId        string        `xorm:"nvarchar(40) 'DemandObjId' not null" json:"LOG_ArtDemandLstCache-DemandObjId"`
	DemandType         string        `xorm:"nvarchar(40) 'DemandType' not null" json:"LOG_ArtDemandLstCache-DemandType"`
	Status             int           `xorm:"int 'Status' not null" json:"LOG_ArtDemandLstCache-Status"`
	DemandSendTime     grmi.DateTime `xorm:"datetime 'DemandSendTime'" json:"LOG_ArtDemandLstCache-DemandSendTime"`
	DemandRecieveTime  grmi.DateTime `xorm:"datetime 'DemandRecieveTime'" json:"LOG_ArtDemandLstCache-DemandRecieveTime"`
	DemandConfirmTime  grmi.DateTime `xorm:"datetime 'DemandConfirmTime'" json:"LOG_ArtDemandLstCache-DemandConfirmTime"`
	DemandCloseTime    grmi.DateTime `xorm:"datetime 'DemandCloseTime'" json:"LOG_ArtDemandLstCache-DemandCloseTime"`
	DemandDeliveredQty float64       `xorm:"float 'DemandDeliveredQty' not null" json:"LOG_ArtDemandLstCache-DemandDeliveredQty"`
	DemandCtrlPara1    int           `xorm:"int 'DemandCtrlPara1' not null" json:"LOG_ArtDemandLstCache-DemandCtrlPara1"`
	DemandCtrlPara2    int           `xorm:"int 'DemandCtrlPara2' not null" json:"LOG_ArtDemandLstCache-DemandCtrlPara2"`
	DemandCtrlPara3    string        `xorm:"nvarchar(100) 'DemandCtrlPara3' not null" json:"LOG_ArtDemandLstCache-DemandCtrlPara3"`
	DemandCtrlPara4    string        `xorm:"nvarchar(100) 'DemandCtrlPara4' not null" json:"LOG_ArtDemandLstCache-DemandCtrlPara4"`
	DemandCtrlTime1    grmi.DateTime `xorm:"datetime 'DemandCtrlTime1'" json:"LOG_ArtDemandLstCache-DemandCtrlTime1"`
	DemandCtrlTime2    grmi.DateTime `xorm:"datetime 'DemandCtrlTime2'" json:"LOG_ArtDemandLstCache-DemandCtrlTime2"`
	OrderStatus        int           `xorm:"int 'OrderStatus' not null" json:"LOG_ArtDemandLstCache-OrderStatus"`
	UnproducedQty      float64       `xorm:"float 'UnproducedQty' not null" json:"LOG_ArtDemandLstCache-UnproducedQty"`
	OrderType          string        `xorm:"nvarchar(20) 'OrderType' not null" json:"LOG_ArtDemandLstCache-OrderType"`
	ProjectId          string        `xorm:"nvarchar(40) 'ProjectId' not null" json:"LOG_ArtDemandLstCache-ProjectId"`
	DemandStatus       int           `xorm:"int 'DemandStatus' not null" json:"LOG_ArtDemandLstCache-DemandStatus"`
	PlanResourceId     string        `xorm:"nvarchar(40) 'PlanResourceId'" json:"LOG_ArtDemandLstCache-PlanResourceId"`
	PlanStartDate      grmi.Date     `xorm:"date 'PlanStartDate'" json:"LOG_ArtDemandLstCache-PlanStartDate"`
	PlanEndDate        grmi.Date     `xorm:"date 'PlanEndDate'" json:"LOG_ArtDemandLstCache-PlanEndDate"`
	PlanStartTime      grmi.DateTime `xorm:"datetime 'PlanStartTime'" json:"LOG_ArtDemandLstCache-PlanStartTime"`
	PlanEndTime        grmi.DateTime `xorm:"datetime 'PlanEndTime'" json:"LOG_ArtDemandLstCache-PlanEndTime"`
	ActStartTime       grmi.DateTime `xorm:"datetime 'ActStartTime'" json:"LOG_ArtDemandLstCache-ActStartTime"`
	ActEndTime         grmi.DateTime `xorm:"datetime 'ActEndTime'" json:"LOG_ArtDemandLstCache-ActEndTime"`
	LastModify         grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"LOG_ArtDemandLstCache-LastModify"`
	LastUser           string        `xorm:"nvarchar(20) 'LastUser' not null" json:"LOG_ArtDemandLstCache-LastUser"`
	CreateTime         grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"LOG_ArtDemandLstCache-CreateTime"`
}

/******************************************************************************
 *
 * @Function Name            : GetKey
 *-----------------------------------------------------------------------------
 *
 * @Description              : 获取实体的主键
 *
 * @Return Value             : 实体的主键
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-06-11 16:10:25
 *
 ******************************************************************************/
func (self *ArtDemandLstCache) GetKey() core.PK {
	return core.PK{self.PlantNr, self.DemandId, self.Pos}
}
