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

package wm

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

/******************************************************************************
 *
 * @Struct Name              : GoodsIssueDetail
 *-----------------------------------------------------------------------------
 *
 * @Description              : GoodsIssueDetail的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-06-29 10:57:04
 *
 ******************************************************************************/
type GoodsIssueDetail struct {
	GoodsIssueId  string        `xorm:"pk nvarchar(40) 'GoodsIssueId'" json:"WM_GoodsIssueDetail-GoodsIssueId"`
	GIPos         int           `xorm:"pk int 'GIPos'" json:"WM_GoodsIssueDetail-GIPos"`
	Remark        string        `xorm:"nvarchar(255) 'Remark' not null" json:"WM_GoodsIssueDetail-Remark"`
	ArtId         string        `xorm:"nvarchar(40) 'ArtId' not null" json:"WM_GoodsIssueDetail-ArtId"`
	ArtName       string        `xorm:"nvarchar(100) 'ArtName' not null" json:"WM_GoodsIssueDetail-ArtName"`
	ArtType       string        `xorm:"nvarchar(40) 'ArtType' not null" json:"WM_GoodsIssueDetail-ArtType"`
	RequiredQty   float64       `xorm:"float 'RequiredQty' not null" json:"WM_GoodsIssueDetail-RequiredQty"`//必须数量
	RequestType   string        `xorm:"nvarchar(40) 'RequestType' not null" json:"WM_GoodsIssueDetail-RequestType"`//请求类型
	ReservedQty   float64       `xorm:"float 'ReservedQty' not null" json:"WM_GoodsIssueDetail-ReservedQty"`//保留数量
	ActualQty     float64       `xorm:"float 'ActualQty' not null" json:"WM_GoodsIssueDetail-ActualQty"`//实际数量
	OrderQty      float64       `xorm:"float 'OrderQty' not null" json:"WM_GoodsIssueDetail-OrderQty"`// 订单数量
	DeliveryDate  grmi.Date     `xorm:"date 'DeliveryDate'" json:"WM_GoodsIssueDetail-DeliveryDate"` // 交付时间
	InspectToggle bool          `xorm:"bit 'InspectToggle' not null" json:"WM_GoodsIssueDetail-InspectToggle"`
	InspectPlanId string        `xorm:"nvarchar(40) 'InspectPlanId' not null" json:"WM_GoodsIssueDetail-InspectPlanId"`
	InspectStatus string        `xorm:"nvarchar(3) 'InspectStatus' not null" json:"WM_GoodsIssueDetail-InspectStatus"`
	Auditor       string        `xorm:"nvarchar(40) 'Auditor' not null" json:"WM_GoodsIssueDetail-Auditor"`
	AuditTime     grmi.DateTime `xorm:"datetime 'AuditTime' not null" json:"WM_GoodsIssueDetail-AuditTime"`
	AuditStatus   string        `xorm:"nvarchar(3) 'AuditStatus' not null" json:"WM_GoodsIssueDetail-AuditStatus"`
	BatchId       string        `xorm:"nvarchar(255) 'BatchId' not null" json:"WM_GoodsIssueDetail-BatchId"`
	GICtrlPara1   int           `xorm:"int 'GICtrlPara1' not null" json:"WM_GoodsIssueDetail-GICtrlPara1"`
	GIICtrlPara2  int           `xorm:"int 'GIICtrlPara2' not null" json:"WM_GoodsIssueDetail-GIICtrlPara2"`
	GIICtrlPara3  int           `xorm:"int 'GIICtrlPara3' not null" json:"WM_GoodsIssueDetail-GIICtrlPara3"`
	GIICtrlPara4  int           `xorm:"int 'GIICtrlPara4' not null" json:"WM_GoodsIssueDetail-GIICtrlPara4"`
	GIICtrlPara5  string        `xorm:"nvarchar(255) 'GIICtrlPara5'" json:"WM_GoodsIssueDetail-GIICtrlPara5"`
	GIICtrlPara6  string        `xorm:"nvarchar(255) 'GIICtrlPara6'" json:"WM_GoodsIssueDetail-GIICtrlPara6"`
	GIICtrlPara7  string        `xorm:"nvarchar(255) 'GIICtrlPara7'" json:"WM_GoodsIssueDetail-GIICtrlPara7"`
	GIICtrlPara8  string        `xorm:"nvarchar(255) 'GIICtrlPara8'" json:"WM_GoodsIssueDetail-GIICtrlPara8"`
	GIICtrlPara9  float64       `xorm:"float 'GIICtrlPara9'" json:"WM_GoodsIssueDetail-GIICtrlPara9"`
	GIICtrlPara10 float64       `xorm:"float 'GIICtrlPara10'" json:"WM_GoodsIssueDetail-GIICtrlPara10"`
	GIICtrlPara11 float64       `xorm:"float 'GIICtrlPara11'" json:"WM_GoodsIssueDetail-GIICtrlPara11"`
	GIICtrlPara12 float64       `xorm:"float 'GIICtrlPara12'" json:"WM_GoodsIssueDetail-GIICtrlPara12"`
	GIICtrlPara13 grmi.DateTime `xorm:"datetime 'GIICtrlPara13'" json:"WM_GoodsIssueDetail-GIICtrlPara13"`
	GIICtrlPara14 grmi.DateTime `xorm:"datetime 'GIICtrlPara14'" json:"WM_GoodsIssueDetail-GIICtrlPara14"`
	GIICtrlPara15 grmi.DateTime `xorm:"datetime 'GIICtrlPara15'" json:"WM_GoodsIssueDetail-GIICtrlPara15"`
	GIICtrlPara16 grmi.DateTime `xorm:"datetime 'GIICtrlPara16'" json:"WM_GoodsIssueDetail-GIICtrlPara16"`
	LastModify    grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"WM_GoodsIssueDetail-LastModify"`
	LastUser      string        `xorm:"nvarchar(20) 'LastUser' not null" json:"WM_GoodsIssueDetail-LastUser"`
	CreateTime    grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"WM_GoodsIssueDetail-CreateTime"`
	BeforeQty     float64       `xorm:"float 'BeforeQty' not null" json:"WM_GoodsIssueDetail-BeforeQty"`// 之前库存
	CurQty     float64       	`xorm:"float 'CurQty' not null" json:"WM_GoodsIssueDetail-CurQty"`// 当前库存
	QtyUom         string        `xorm:"nvarchar(40) 'QtyUom' not null" json:"WM_GoodsIssueDetail-QtyUom"`

	GoodsIssueLst       []GoodsIssueLst       `json:"goods-issue-lst" xorm:"-"`               //
}

/******************************************************************************
 *
 * @Function Name            : GetKey
 *-----------------------------------------------------------------------------
 *
 * @Description              : 获取实体的主键
 *
 * @Return Value             : 实体的主键
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-06-29 10:57:04
 *
 ******************************************************************************/
func (self *GoodsIssueDetail) GetKey() core.PK {
	return core.PK{self.GoodsIssueId, self.GIPos}
}
