69 lines
3.1 KiB
Go
69 lines
3.1 KiB
Go
package models
|
|
|
|
import "time"
|
|
|
|
const (
|
|
SchedTplAlignWeek int8 = 1
|
|
SchedTplAlignRoll int8 = 2
|
|
SchedTplAlignMonth int8 = 3
|
|
)
|
|
|
|
const (
|
|
SchedTplDayWork int8 = 1
|
|
SchedTplDayRest int8 = 2
|
|
)
|
|
|
|
const (
|
|
SchedTplTypeDoubleWeekend int8 = 1
|
|
SchedTplTypeSingleWeekend int8 = 2
|
|
SchedTplTypeBigSmallWeek int8 = 3
|
|
SchedTplTypeMonthRest int8 = 4
|
|
SchedTplTypeThreeShift int8 = 5
|
|
SchedTplTypeWorkRestOne int8 = 6
|
|
SchedTplTypeCustom int8 = 9
|
|
)
|
|
|
|
type PlatformSchedTpl struct {
|
|
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
|
Code string `orm:"column(code);size(50);default()" json:"code"`
|
|
Name string `orm:"column(name);size(50)" json:"name"`
|
|
TemplateType int8 `orm:"column(template_type);default(9)" json:"template_type"`
|
|
AlignMode int8 `orm:"column(align_mode);default(1)" json:"align_mode"`
|
|
CycleDays int `orm:"column(cycle_days);default(7)" json:"cycle_days"`
|
|
WeekOffset int8 `orm:"column(week_offset);default(0)" json:"week_offset"`
|
|
MonthRestDays int8 `orm:"column(month_rest_days);default(0)" json:"month_rest_days"`
|
|
MonthRestWeekday int8 `orm:"column(month_rest_weekday);default(0)" json:"month_rest_weekday"`
|
|
Summary string `orm:"column(summary);size(255);default()" json:"summary"`
|
|
IsSystem int8 `orm:"column(is_system);default(0)" json:"is_system"`
|
|
Status int8 `orm:"column(status);default(1)" json:"status"`
|
|
Sort int `orm:"column(sort);default(0)" json:"sort"`
|
|
Creater string `orm:"column(creater);size(50);default()" json:"creater"`
|
|
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
|
UpdateTime *time.Time `orm:"column(update_time);auto_now;type(datetime);null" json:"update_time"`
|
|
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
|
}
|
|
|
|
func (m *PlatformSchedTpl) TableName() string {
|
|
return "yz_platform_sched_tpl"
|
|
}
|
|
|
|
type PlatformSchedTplDay struct {
|
|
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
|
TemplateID uint64 `orm:"column(template_id);default(0)" json:"template_id"`
|
|
DayIndex int `orm:"column(day_index);default(0)" json:"day_index"`
|
|
DayType int8 `orm:"column(day_type);default(1)" json:"day_type"`
|
|
ShiftName string `orm:"column(shift_name);size(50);default()" json:"shift_name"`
|
|
ShiftShort string `orm:"column(shift_short);size(20);default()" json:"shift_short"`
|
|
Color string `orm:"column(color);size(20);default(#409EFF)" json:"color"`
|
|
WorkStart string `orm:"column(work_start);size(8);default()" json:"work_start"`
|
|
WorkEnd string `orm:"column(work_end);size(8);default()" json:"work_end"`
|
|
RestStart string `orm:"column(rest_start);size(8);default()" json:"rest_start"`
|
|
RestEnd string `orm:"column(rest_end);size(8);default()" json:"rest_end"`
|
|
WorkHours float64 `orm:"column(work_hours);type(decimal);digits(5);decimals(2);default(0)" json:"work_hours"`
|
|
Remark string `orm:"column(remark);size(100);default()" json:"remark"`
|
|
}
|
|
|
|
func (m *PlatformSchedTplDay) TableName() string {
|
|
return "yz_platform_sched_tpl_day"
|
|
}
|