reject_task_record.go
1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package domain
import "time"
// 驳回任务记录
type RejectTaskRecord struct {
// 驳回任务记录ID
RejectTaskRecordId int64 `json:"rejectTaskRecordId"`
// 任务
Task *Task `json:"task"`
// 操作人
Operator *EmployeeInfo `json:"operator"`
// 驳回理由
RejectReason string `json:"rejectReason"`
// 创建时间
CreateTime time.Time `json:"createTime"`
}
type RejectTaskRecordRepository interface {
Save(rejectTaskRecord *RejectTaskRecord) (*RejectTaskRecord, error)
Remove(rejectTaskRecord *RejectTaskRecord) (*RejectTaskRecord, error)
FindOne(queryOptions map[string]interface{}) (*RejectTaskRecord, error)
Find(queryOptions map[string]interface{}) (int64, []*RejectTaskRecord, error)
}
func (rejectTaskRecord *RejectTaskRecord) Identify() interface{} {
if rejectTaskRecord.RejectTaskRecordId == 0 {
return nil
}
return rejectTaskRecord.RejectTaskRecordId
}
func (rejectTaskRecord *RejectTaskRecord) Update(data map[string]interface{}) error {
if rejectReason, ok := data["rejectReason"]; ok && rejectReason != "" {
rejectTaskRecord.RejectReason = rejectReason.(string)
}
return nil
}