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

package base

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

/******************************************************************************
 *
 * @Struct Name              : WeekModel
 *-----------------------------------------------------------------------------
 *
 * @Description              : WeekModel的实体映射
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-04-16 10:03:06
 *
 ******************************************************************************/
type WeekModel struct {
	PlantNr        int                  `xorm:"pk int 'PlantNr'" json:"WeekModel-PlantNr"`
	WeekModelNr    int                  `xorm:"pk int 'WeekModelNr' autoincr" json:"WeekModel-WeekModelNr"`
	DateFrom       grmi.Date            `xorm:"date 'DateFrom' not null" json:"WeekModel-DateFrom"`
	Descr          string               `xorm:"nvarchar(100) 'Descr' not null" json:"WeekModel-Descr"`
	Abrev          string               `xorm:"nvarchar(10) 'Abrev' not null" json:"WeekModel-Abrev"`
	CtrlToggle     bool                 `xorm:"bit 'CtrlToggle' not null" json:"WeekModel-CtrlToggle"`
	LoopDays       int                  `xorm:"int 'LoopDays' not null" json:"WeekModel-LoopDays"`
	LastModify     grmi.DateTime        `xorm:"datetime 'LastModify' not null updated" json:"WeekModel-LastModify"`
	LastUser       string               `xorm:"nvarchar(20) 'LastUser' not null" json:"WeekModel-LastUser"`
	CreateTime     grmi.DateTime        `xorm:"datetime 'CreateTime' not null created" json:"WeekModel-CreateTime"`
	WeekModelLst   []WeekModelLstAndDay `xorm:"-" json:"WeekModel-WeekModelLst"`
	WeekModelLstLi []WeekModelLst       `xorm:"-" json:"WeekModel-WeekModelLstLi"`
}

/******************************************************************************
 *
 * @Function Name            : GetKey
 *-----------------------------------------------------------------------------
 *
 * @Description              : 获取实体的主键
 *
 * @Return Value             : 实体的主键
 *
 * @Author                   : 代码生成器创建
 *
 * @Date                     : 2021-04-14 08:56:34
 *
 ******************************************************************************/
func (self *WeekModel) GetKey() core.PK {
	return core.PK{self.PlantNr, self.WeekModelNr}
}
