package model import "time" // Base 所有模型的公共字段 type Base struct { ID uint `gorm:"primarykey" json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } // AllModels 需要 AutoMigrate 的模型清单(按依赖顺序) func AllModels() []any { return []any{ &User{}, &Pet{}, &HealthRecord{}, &DailyTask{}, &Plan{}, &PlanTask{}, &Reminder{}, &Post{}, &Comment{}, &PostLike{}, &Article{}, &AIMessage{}, &ProMembership{}, &Admin{}, &DailyAdvice{}, } }