| | |
| | | // TimeSpent 花费时间 |
| | | TimeSpent struct { |
| | | Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` |
| | | Name string `json:"name" gorm:"column:name"` |
| | | Name string `json:"name" gorm:"column:name"` |
| | | } |
| | | |
| | | // TimeSpentSearch 花费时间搜索条件 |
| | | TimeSpentSearch struct { |
| | | TimeSpent |
| | | Orm *gorm.DB |
| | | QueryClass constvar.TimeSpentQueryClass |
| | | KeywordType constvar.TimeSpentKeywordType |
| | | Keyword string |
| | | PageNum int |
| | | PageSize int |
| | | Orm *gorm.DB |
| | | QueryClass constvar.TimeSpentQueryClass |
| | | KeywordType constvar.TimeSpentKeywordType |
| | | Keyword string |
| | | PageNum int |
| | | PageSize int |
| | | } |
| | | ) |
| | | |
| | |
| | | if total != 0 { |
| | | return nil |
| | | } |
| | | records := []*TimeSpent{ |
| | | {Name: "1小时"}, |
| | | {Name: "2小时"}, |
| | | {Name: "0.5个工作日"}, |
| | | {Name: "1个工作日"}, |
| | | {Name: "2个工作日"}, |
| | | {Name: "2个工作日以上"}, |
| | | } |
| | | records := []*TimeSpent{} |
| | | return slf.CreateBatch(records) |
| | | } |