fd097729d7
- 成就系统、连续打卡天数计算、管理后台成就 CRUD - 梦想目标图标预设 DreamPreset 与用户端 dream-presets 接口 - 管理后台梦想图标 CRUD;戒烟打卡 summary 修正 - 忽略根目录编译产物 /api Made-with: Cursor
24 lines
822 B
Go
24 lines
822 B
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type DreamPreset struct {
|
|
ID uint `gorm:"primaryKey;comment:主键" json:"id"`
|
|
CreatedAt time.Time `gorm:"comment:创建时间" json:"created_at"`
|
|
UpdatedAt time.Time `gorm:"comment:更新时间" json:"updated_at"`
|
|
DeletedAt gorm.DeletedAt `gorm:"index;comment:删除时间" json:"-"`
|
|
|
|
Title string `gorm:"column:title;size:64;comment:图标名称" json:"title"`
|
|
CoverImage string `gorm:"column:cover_image;size:500;comment:图标(emoji或图片URL)" json:"cover_image"`
|
|
IsActive bool `gorm:"column:is_active;default:true;comment:是否启用" json:"is_active"`
|
|
SortOrder int `gorm:"column:sort_order;default:0;comment:排序" json:"sort_order"`
|
|
}
|
|
|
|
func (DreamPreset) TableName() string {
|
|
return "fa_dream_goal_preset"
|
|
}
|