|
// Copyright (c) Shenyang Leading Edge Intelligent Technology Co., Ltd. All rights reserved.
|
|
|
|
package pm
|
|
|
|
import (
|
|
"LAPP_ACURA_MOM_BACKEND/grmi"
|
|
"xorm.io/core"
|
|
)
|
|
|
|
/******************************************************************************
|
|
*
|
|
* @Struct Name : WorkOrder
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : WorkOrder的实体映射
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-10-08 13:20:42
|
|
*
|
|
******************************************************************************/
|
|
type WorkOrder struct {
|
|
PlantNr int `xorm:"pk int 'PlantNr'" json:"PM_WorkOrder-PlantNr"`
|
|
MaintWorkOrderId string `xorm:"pk varchar(18) 'MaintWorkOrderId'" json:"PM_WorkOrder-MaintWorkOrderId"`
|
|
MainServiceNr string `xorm:"varchar(20) 'MainServiceNr'" json:"PM_WorkOrder-MainServiceNr"`
|
|
Descr string `xorm:"varchar(40) 'Descr' not null" json:"PM_WorkOrder-Descr"`
|
|
Status int `xorm:"int 'Status' not null" json:"PM_WorkOrder-Status"`
|
|
Priority int `xorm:"smallint 'Priority' not null" json:"PM_WorkOrder-Priority"`
|
|
AssetNr int `xorm:"int 'AssetNr' not null" json:"PM_WorkOrder-AssetNr"`
|
|
PlBegDat grmi.Date `xorm:"date 'PlBegDat' not null" json:"PM_WorkOrder-PlBegDat"`
|
|
PlEndDat grmi.Date `xorm:"date 'PlEndDat' not null" json:"PM_WorkOrder-PlEndDat"`
|
|
NeedSchedule int `xorm:"int 'NeedSchedule' not null" json:"PM_WorkOrder-NeedSchedule"`
|
|
MainTimeLen float64 `xorm:"decimal 'MainTimeLen' not null" json:"PM_WorkOrder-MainTimeLen"`
|
|
TimeUnit string `xorm:"varchar(5) 'TimeUnit' not null" json:"PM_WorkOrder-TimeUnit"`
|
|
SchedBegTime grmi.DateTime `xorm:"datetime 'SchedBegTime' not null" json:"PM_WorkOrder-SchedBegTime"`
|
|
SchedEndTime grmi.DateTime `xorm:"datetime 'SchedEndTime' not null" json:"PM_WorkOrder-SchedEndTime"`
|
|
ActBegTime grmi.DateTime `xorm:"datetime 'ActBegTime' not null" json:"PM_WorkOrder-ActBegTime"`
|
|
ActEndTime grmi.DateTime `xorm:"datetime 'ActEndTime' not null" json:"PM_WorkOrder-ActEndTime"`
|
|
AssignedTo string `xorm:"varchar(1) 'AssignedTo' not null" json:"PM_WorkOrder-AssignedTo"`
|
|
Operator int `xorm:"int 'Operator' not null" json:"PM_WorkOrder-Operator"`
|
|
Vendor int `xorm:"int 'Vendor' not null" json:"PM_WorkOrder-Vendor"`
|
|
MaintType string `xorm:"varchar(14) 'MaintType' not null" json:"PM_WorkOrder-MaintType"`
|
|
CostCenterId string `xorm:"varchar(12) 'CostCenterId' not null" json:"PM_WorkOrder-CostCenterId"`
|
|
PoId string `xorm:"varchar(18) 'PoId' not null" json:"PM_WorkOrder-PoId"`
|
|
LastModify grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"PM_WorkOrder-LastModify"`
|
|
LastUser string `xorm:"nvarchar(20) 'LastUser' not null" json:"PM_WorkOrder-LastUser"`
|
|
CreateTime grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"PM_WorkOrder-CreateTime"`
|
|
|
|
Valst []WorkOrderAttrLst `json:"valst" xorm:"-"`
|
|
}
|
|
|
|
type PmWoService struct {
|
|
WorkOrder `xorm:"extends"`
|
|
Service `xorm:"extends"`
|
|
}
|
|
|
|
type CreateData struct {
|
|
TaskType string
|
|
Asset `xorm:"extends"`
|
|
AssetTemplateLst `xorm:"extends"`
|
|
Template `xorm:"extends"`
|
|
TemplateServiceLst `xorm:"extends"`
|
|
Service `xorm:"extends"`
|
|
}
|
|
|
|
/******************************************************************************
|
|
*
|
|
* @Function Name : GetKey
|
|
*-----------------------------------------------------------------------------
|
|
*
|
|
* @Description : 获取实体的主键
|
|
*
|
|
* @Return Value : 实体的主键
|
|
*
|
|
* @Author : 代码生成器创建
|
|
*
|
|
* @Date : 2021-10-08 13:20:42
|
|
*
|
|
******************************************************************************/
|
|
func (self *WorkOrder) GetKey() core.PK {
|
|
return core.PK{self.PlantNr, self.MaintWorkOrderId}
|
|
}
|