feat:完善项目

This commit is contained in:
henry
2021-11-05 18:07:32 +08:00
parent d20ac3e09f
commit 85b58968d1
13 changed files with 254 additions and 17 deletions

View File

@ -1,5 +1,7 @@
package model
import "strings"
// WorkSchedule 工单流程数据模型
type WorkSchedule struct {
Model
@ -17,7 +19,7 @@ type WorkScheduleTarget int
const (
// WorkScheduleTargetForPerson 个人
WorkScheduleTargetForPerson int = iota + 1
WorkScheduleTargetForPerson WorkScheduleTarget = iota + 1
// WorkScheduleTargetForRole 角色
WorkScheduleTargetForRole
)
@ -26,6 +28,14 @@ func (m *WorkSchedule) TableName() string {
return "work_schedule"
}
func (m *WorkSchedule) GetTargetValueAttribute() []string {
return strings.Split(m.TargetValue, ",")
}
func (m *WorkSchedule) SetTargetValueAttribute(value []string) {
m.TargetValue = strings.Join(value, ",")
}
func NewWorkSchedule() *WorkSchedule {
return &WorkSchedule{}
}