- all db orm use beego orm, don't use gorm anymore.
This commit is contained in:
34
business/model/dtask.go
Normal file
34
business/model/dtask.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type DurableTask struct {
|
||||
ID int `orm:"column(id)" json:"id"`
|
||||
CreatedAt time.Time `orm:"auto_now_add;type(datetime)" json:"createdAt"`
|
||||
UpdatedAt time.Time `orm:"auto_now;type(datetime)" json:"updatedAt"`
|
||||
|
||||
TaskID string `orm:"size(48)"` // 用于标识任务
|
||||
Description string `orm:"size(255)"`
|
||||
CreatedBy string `orm:"size(48)"`
|
||||
FinishedAt time.Time
|
||||
Status int
|
||||
|
||||
TotalItem int
|
||||
FinishedItem int
|
||||
}
|
||||
|
||||
type DurableTaskItem struct {
|
||||
ID int `orm:"column(id)" json:"id"`
|
||||
CreatedAt time.Time `orm:"auto_now_add;type(datetime)" json:"createdAt"`
|
||||
UpdatedAt time.Time `orm:"auto_now;type(datetime)" json:"updatedAt"`
|
||||
|
||||
TaskID string `orm:"size(48)"` // 用于标识任务
|
||||
TaskIndex int
|
||||
ObjHint string `orm:"size(48)"`
|
||||
FuncName string `orm:"size(48)"`
|
||||
Params string `orm:"size(2000)"` // 序列化后的参数
|
||||
FinishedAt time.Time
|
||||
Status int
|
||||
}
|
||||
Reference in New Issue
Block a user