feat:完善项目
This commit is contained in:
@ -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{}
|
||||
}
|
||||
|
Reference in New Issue
Block a user