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

package api

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

/******************************************************************************
 *
 * @Struct Name              : PortalWorkOrder
 *-----------------------------------------------------------------------------
 *
 * @Description              : PortalWorkOrder的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-05-14 10:40:07
 *
 ******************************************************************************/
type PortalWorkOrder struct {
	Barcode     string        `xorm:"pk varchar(100) 'barcode'" json:"Portal_WorkOrder-barcode"`
	StationCode string        `xorm:"nvarchar(100) 'station_code' not null" json:"Portal_WorkOrder-station_code"`
	StationDesc string        `xorm:"nvarchar(200) 'station_desc'" json:"Portal_WorkOrder-station_desc"`
	ConfigDesc  string        `xorm:"varchar(50) 'config_desc'" json:"Portal_WorkOrder-config_desc"`
	LogTime     grmi.DateTime `xorm:"datetime 'log_time' not null" json:"Portal_WorkOrder-log_time"`
	AutoId      int64         `xorm:"bigint 'auto_id' not null autoincr" json:"Portal_WorkOrder-auto_id"`
	BarcodeDesc string        `xorm:"varchar(100) 'barcode_desc'" json:"Portal_WorkOrder-barcode_desc"`
	PartCode    string        `xorm:"varchar(50) 'part_code' not null" json:"Portal_WorkOrder-part_code"`
	PlanDttm    grmi.DateTime `xorm:"datetime 'plan_dttm' not null" json:"Portal_WorkOrder-plan_dttm"`
	Class1      int           `xorm:"smallint 'class1' not null" json:"Portal_WorkOrder-class1"`
	ConfigKey   string        `xorm:"varchar(10) 'config_key'" json:"Portal_WorkOrder-config_key"`
	Seq         int64         `xorm:"bigint 'seq'" json:"Portal_WorkOrder-seq"`
	Serial      string        `xorm:"varchar(50) 'serial'" json:"Portal_WorkOrder-serial"`
	State       int           `xorm:"int 'state'" json:"Portal_WorkOrder-state"`
	Station     int           `xorm:"smallint 'station'" json:"Portal_WorkOrder-station"`
	Memo        string        `xorm:"varchar(200) 'memo'" json:"Portal_WorkOrder-memo"`
	CustomId    string        `xorm:"nvarchar(50) 'custom_id'" json:"Portal_WorkOrder-custom_id"`
	Codebar     string        `xorm:"nvarchar(50) 'codebar'" json:"Portal_WorkOrder-codebar"`
	IsRefresh   bool          `xorm:"bit 'is_refresh'" json:"Portal_WorkOrder-is_refresh"`
	StateName   string        `xorm:"nvarchar(20) 'state_name'" json:"Portal_WorkOrder-state_name"`
	CreateTime  grmi.DateTime `xorm:"datetime 'create_time' not null created" json:"Portal_WorkOrder-CreateTime"`
}

/******************************************************************************
 *
 * @Function Name            : GetKey
 *-----------------------------------------------------------------------------
 *
 * @Description              : 获取实体的主键
 *
 * @Return Value             : 实体的主键
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-05-14 10:40:07
 *
 ******************************************************************************/
func (self *PortalWorkOrder) GetKey() core.PK {
	return core.PK{self.Barcode}
}
