// 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              : GoodsReceiptDetail
 *-----------------------------------------------------------------------------
 *
 * @Description              : GoodsReceiptDetail的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-06-29 10:57:04
 *
 ******************************************************************************/
type GoodsReceiptDetail struct {
	GoodsReceiptId string        `xorm:"pk nvarchar(40) 'GoodsReceiptId'" json:"WM_GoodsReceiptDetail-GoodsReceiptId"`//入库流水号
	GRPos          int           `xorm:"pk int 'GRPos'" json:"WM_GoodsReceiptDetail-GRPos"`//入库详情编号 1，2，3。。。
	ArtId          string        `xorm:"nvarchar(40) 'ArtId' not null" json:"WM_GoodsReceiptDetail-ArtId"`//物料id
	ArtName        string        `xorm:"nvarchar(100) 'ArtName' not null" json:"WM_GoodsReceiptDetail-ArtName"`//物料名称
	ArtType        string        `xorm:"nvarchar(40) 'ArtType' not null" json:"WM_GoodsReceiptDetail-ArtType"`//物料类型
	Remark         string        `xorm:"nvarchar(100) 'Remark' not null" json:"WM_GoodsReceiptDetail-Remark"`//备注
	Auditor        string        `xorm:"nvarchar(40) 'Auditor' not null" json:"WM_GoodsReceiptDetail-Auditor"`//审核人
	AuditTime      grmi.DateTime `xorm:"datetime 'AuditTime' not null" json:"WM_GoodsReceiptDetail-AuditTime"`//审核时间
	AuditStatus    string        `xorm:"nvarchar(3) 'AuditStatus' not null" json:"WM_GoodsReceiptDetail-AuditStatus"`//审核状态
	BatchId        string        `xorm:"nvarchar(255) 'BatchId' not null" json:"WM_GoodsReceiptDetail-BatchId"`// 批次ID
	OrderedQty     float64       `xorm:"float 'OrderedQty' not null" json:"WM_GoodsReceiptDetail-OrderedQty"`// 订单数量
	OrderType      string        `xorm:"nvarchar(40) 'OrderType' not null" json:"WM_GoodsReceiptDetail-OrderType"`// 订单类型
	DeliveredQty   float64       `xorm:"float 'DeliveredQty' not null" json:"WM_GoodsReceiptDetail-DeliveredQty"`// 发运数量
	QtyUom         string        `xorm:"nvarchar(40) 'QtyUom' not null" json:"WM_GoodsReceiptDetail-QtyUom"`//计量单位 （个）
	UnitPrice      float64       `xorm:"float 'UnitPrice'" json:"WM_GoodsReceiptDetail-UnitPrice"`//单价
	TotalPrice     float64       `xorm:"float 'TotalPrice'" json:"WM_GoodsReceiptDetail-TotalPrice"`//总金额
	Currency       string        `xorm:"nvarchar(40) 'Currency' not null" json:"WM_GoodsReceiptDetail-Currency"`//单价货币类型
	InspectToggle  bool          `xorm:"bit 'InspectToggle' not null" json:"WM_GoodsReceiptDetail-InspectToggle"`// 检查开关
	InspectPlanId  string        `xorm:"nvarchar(40) 'InspectPlanId' not null" json:"WM_GoodsReceiptDetail-InspectPlanId"`// 检查计划ID
	InspectStatus  string        `xorm:"nvarchar(3) 'InspectStatus' not null" json:"WM_GoodsReceiptDetail-InspectStatus"`// 检查状态
	GRICtrlPara1   int           `xorm:"int 'GRICtrlPara1' not null" json:"WM_GoodsReceiptDetail-GRICtrlPara1"`
	GRICtrlPara2   int           `xorm:"int 'GRICtrlPara2' not null" json:"WM_GoodsReceiptDetail-GRICtrlPara2"`
	GRICtrlPara3   int           `xorm:"int 'GRICtrlPara3' not null" json:"WM_GoodsReceiptDetail-GRICtrlPara3"`
	GRICtrlPara4   int           `xorm:"int 'GRICtrlPara4' not null" json:"WM_GoodsReceiptDetail-GRICtrlPara4"`
	GRICtrlPara5   string        `xorm:"nvarchar(255) 'GRICtrlPara5'" json:"WM_GoodsReceiptDetail-GRICtrlPara5"`
	GRICtrlPara6   string        `xorm:"nvarchar(255) 'GRICtrlPara6'" json:"WM_GoodsReceiptDetail-GRICtrlPara6"`
	GRICtrlPara7   string        `xorm:"nvarchar(255) 'GRICtrlPara7'" json:"WM_GoodsReceiptDetail-GRICtrlPara7"`
	GRICtrlPara8   string        `xorm:"nvarchar(255) 'GRICtrlPara8'" json:"WM_GoodsReceiptDetail-GRICtrlPara8"`
	GRICtrlPara9   float64       `xorm:"float 'GRICtrlPara9'" json:"WM_GoodsReceiptDetail-GRICtrlPara9"`
	GRICtrlPara10  float64       `xorm:"float 'GRICtrlPara10'" json:"WM_GoodsReceiptDetail-GRICtrlPara10"`
	GRICtrlPara11  float64       `xorm:"float 'GRICtrlPara11'" json:"WM_GoodsReceiptDetail-GRICtrlPara11"`
	GRICtrlPara12  float64       `xorm:"float 'GRICtrlPara12'" json:"WM_GoodsReceiptDetail-GRICtrlPara12"`
	GRICtrlPara13  grmi.DateTime `xorm:"datetime 'GRICtrlPara13'" json:"WM_GoodsReceiptDetail-GRICtrlPara13"`
	GRICtrlPara14  grmi.DateTime `xorm:"datetime 'GRICtrlPara14'" json:"WM_GoodsReceiptDetail-GRICtrlPara14"`
	GRICtrlPara15  grmi.DateTime `xorm:"datetime 'GRICtrlPara15'" json:"WM_GoodsReceiptDetail-GRICtrlPara15"`
	GRICtrlPara16  grmi.DateTime `xorm:"datetime 'GRICtrlPara16'" json:"WM_GoodsReceiptDetail-GRICtrlPara16"`
	LastModify     grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"WM_GoodsReceiptDetail-LastModify"`
	LastUser       string        `xorm:"nvarchar(20) 'LastUser' not null" json:"WM_GoodsReceiptDetail-LastUser"`
	CreateTime     grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"WM_GoodsReceiptDetail-CreateTime"`
	BeforeQty     float64       `xorm:"float 'BeforeQty' not null" json:"WM_GoodsReceiptDetail-BeforeQty"`// 之前库存
	CurQty     float64       	`xorm:"float 'CurQty' not null" json:"WM_GoodsReceiptDetail-CurQty"`// 当前库存

	GoodsReceiptLst       []GoodsReceiptLst       `json:"goods-receipt-lst" xorm:"-"`               // 库位列表
}

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