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

package base

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

/******************************************************************************
 *
 * @Struct Name              : WorkLine
 *-----------------------------------------------------------------------------
 *
 * @Description              : WorkLine的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-05-07 16:20:28
 *
 ******************************************************************************/
type WorkLine struct {
	PlantNr                  int           `xorm:"pk int 'PlantNr'" json:"WorkLine-PlantNr"`
	WorkLineid               string        `xorm:"pk nvarchar(40) 'WorkLineid'" json:"WorkLine-WorkLineid"`
	Descr                    string        `xorm:"nvarchar(100) 'Descr' not null" json:"WorkLine-Descr"`
	LineType                 string        `xorm:"nvarchar(1) 'LineType' not null" json:"WorkLine-LineType"`
	LinePlanMode             string        `xorm:"nvarchar(3) 'LinePlanMode' not null" json:"WorkLine-LinePlanMode"`
	WeekModelNr              int           `xorm:"int 'WeekModelNr' not null" json:"WorkLine-WeekModelNr"`
	WorkCalendarNr           int           `xorm:"int 'WorkCalendarNr' not null" json:"WorkLine-WorkCalendarNr"`
	Location                 string        `xorm:"nvarchar(40) 'Location' not null" json:"WorkLine-Location"`
	CostCenterId             string        `xorm:"nvarchar(40) 'CostCenterId' not null" json:"WorkLine-CostCenterId"`
	CostRate                 float64       `xorm:"float 'CostRate' not null" json:"WorkLine-CostRate"`
	ProdEff                  float64       `xorm:"float 'ProdEff' not null" json:"WorkLine-ProdEff"`
	ReqWorkers               int           `xorm:"int 'ReqWorkers' not null" json:"WorkLine-ReqWorkers"`
	Pos                      int           `xorm:"int 'Pos' not null" json:"WorkLine-Pos"`
	TaskQueueSortWay         string        `xorm:"nvarchar(10) 'TaskQueueSortWay' not null" json:"WorkLine-TaskQueueSortWay"`
	MultiQueueMixSortToggle  bool          `xorm:"bit 'MultiQueueMixSortToggle' not null" json:"WorkLine-MultiQueueMixSortToggle"`
	TaskQueueMixSortWay      string        `xorm:"nvarchar(10) 'TaskQueueMixSortWay' not null" json:"WorkLine-TaskQueueMixSortWay"`
	MixSortLogic             string        `xorm:"nvarchar(100) 'MixSortLogic' not null" json:"WorkLine-MixSortLogic"`
	TaskReleaseWay           string        `xorm:"nvarchar(10) 'TaskReleaseWay' not null" json:"WorkLine-TaskReleaseWay"`
	ReleaseQtyParameter      int           `xorm:"int 'ReleaseQtyParameter' not null" json:"WorkLine-ReleaseQtyParameter"`
	ReleaseTimeParameter     grmi.DateTime `xorm:"datetime 'ReleaseTimeParameter'" json:"WorkLine-ReleaseTimeParameter"`
	ReleaseCtrlParameter     string        `xorm:"nvarchar(100) 'ReleaseCtrlParameter' not null" json:"WorkLine-ReleaseCtrlParameter"`
	ReleaseDurationParameter int           `xorm:"int 'ReleaseDurationParameter'" json:"WorkLine-ReleaseDurationParameter"`
	LastModify               grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"WorkLine-LastModify"`
	LastUser                 string        `xorm:"nvarchar(20) 'LastUser' not null" json:"WorkLine-LastUser"`
	CreateTime               grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"WorkLine-CreateTime"`
	WorkPlaceValst           []WorkPlace   `json:"WorkPlaceValst" xorm:"-"`
	WorkPlaceUnValst         []WorkPlace   `json:"WorkPlaceUnvalst" xorm:"-"`
}

/******************************************************************************
 *
 * @Function Name            : GetKey
 *-----------------------------------------------------------------------------
 *
 * @Description              : 获取实体的主键
 *
 * @Return Value             : 实体的主键
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-03-23 17:06:57
 *
 ******************************************************************************/
func (self *WorkLine) GetKey() core.PK {
	return core.PK{self.PlantNr, self.WorkLineid}
}
