创建任务表、用户任务表,生成 model、dao
This commit is contained in:
20
internal/model/do/tasks.go
Normal file
20
internal/model/do/tasks.go
Normal file
@ -0,0 +1,20 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// Tasks is the golang structure of table tasks for DAO operations like Where/Data.
|
||||
type Tasks struct {
|
||||
g.Meta `orm:"table:tasks, do:true"`
|
||||
Id interface{} // 任务唯一标识符
|
||||
QqNetbarTaskId interface{} // QQ网吧任务ID
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
24
internal/model/do/user_tasks.go
Normal file
24
internal/model/do/user_tasks.go
Normal file
@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package do
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// UserTasks is the golang structure of table user_tasks for DAO operations like Where/Data.
|
||||
type UserTasks struct {
|
||||
g.Meta `orm:"table:user_tasks, do:true"`
|
||||
Id interface{} // 用户任务唯一标识符
|
||||
UserId interface{} // 用户ID
|
||||
TaskId interface{} // 任务ID
|
||||
Status interface{} // 任务状态:1=已领取,2=进行中,3=已完成,4=已取消
|
||||
SerialNumber interface{} // 流水号,确保用户任务唯一性
|
||||
CreatedAt *gtime.Time // 创建时间
|
||||
UpdatedAt *gtime.Time // 更新时间
|
||||
CompletedAt *gtime.Time // 任务完成时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
}
|
||||
18
internal/model/entity/tasks.go
Normal file
18
internal/model/entity/tasks.go
Normal file
@ -0,0 +1,18 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// Tasks is the golang structure for table tasks.
|
||||
type Tasks struct {
|
||||
Id int64 `json:"id" orm:"id" description:"任务唯一标识符"` // 任务唯一标识符
|
||||
QqNetbarTaskId string `json:"qqNetbarTaskId" orm:"qq_netbar_task_id" description:"QQ网吧任务ID"` // QQ网吧任务ID
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
22
internal/model/entity/user_tasks.go
Normal file
22
internal/model/entity/user_tasks.go
Normal file
@ -0,0 +1,22 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// UserTasks is the golang structure for table user_tasks.
|
||||
type UserTasks struct {
|
||||
Id int64 `json:"id" orm:"id" description:"用户任务唯一标识符"` // 用户任务唯一标识符
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
TaskId int64 `json:"taskId" orm:"task_id" description:"任务ID"` // 任务ID
|
||||
Status int `json:"status" orm:"status" description:"任务状态:1=已领取,2=进行中,3=已完成,4=已取消"` // 任务状态:1=已领取,2=进行中,3=已完成,4=已取消
|
||||
SerialNumber string `json:"serialNumber" orm:"serial_number" description:"流水号,确保用户任务唯一性"` // 流水号,确保用户任务唯一性
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
CompletedAt *gtime.Time `json:"completedAt" orm:"completed_at" description:"任务完成时间"` // 任务完成时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
}
|
||||
Reference in New Issue
Block a user