Files
bl/modules/task/model/task_log.go
昔念 720294ad27 refactor(blazing): 重构项目并优化数据结构
- 更新 LoginUserInfo 结构体,将 uint64 类型改为 uint32
- 调整 ServerInfo 结构体,将 IP 字段从 []byte 改为 string
- 移除未使用的 ArraySerialize 结构体
- 更新 ByteArray 类,修改相关方法名
- 删除未使用的 serialize 相关代码
- 优化模块导入,移除冗余依赖
2025-06-22 12:05:07 +08:00

38 lines
758 B
Go

package model
import (
"blazing/cool"
)
const TableNameTaskLog = "task_log"
// TaskLog mapped from table <task_log>
type TaskLog struct {
*cool.Model
TaskId uint32 `gorm:"column:taskId;comment:任务ID" json:"taskId"`
Status uint8 `gorm:"column:status;not null;comment:状态 0:失败 1:成功" json:"status"`
Detail string `gorm:"column:detail;comment:详情" json:"detail"`
}
// TableName TaskLog's table name
func (*TaskLog) TableName() string {
return TableNameTaskLog
}
// GroupName TaskLog's table group
func (*TaskLog) GroupName() string {
return "default"
}
// NewTaskLog create a new TaskLog
func NewTaskLog() *TaskLog {
return &TaskLog{
Model: cool.NewModel(),
}
}
// init 创建表
func init() {
cool.CreateTable(&TaskLog{})
}