Files
pig-farm-controller/internal/infra/models/models.go

17 lines
357 B
Go
Raw Normal View History

2025-09-13 15:14:08 +08:00
package models
// GetAllModels 返回一个包含所有数据库模型实例的切片。
// 这个函数用于在数据库初始化时自动迁移所有的表结构。
func GetAllModels() []interface{} {
return []interface{}{
&User{},
&Device{},
&Plan{},
&SubPlan{},
&Task{},
2025-09-17 16:17:36 +08:00
&PlanExecutionLog{},
&TaskExecutionLog{},
&PendingTask{},
2025-09-13 15:14:08 +08:00
}
}