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

19 lines
397 B
Go

package models
// GetAllModels 返回一个包含所有数据库模型实例的切片。
// 这个函数用于在数据库初始化时自动迁移所有的表结构。
func GetAllModels() []interface{} {
return []interface{}{
&User{},
&Device{},
&Plan{},
&SubPlan{},
&Task{},
&PlanExecutionLog{},
&TaskExecutionLog{},
&PendingTask{},
&SensorData{},
&DeviceCommandLog{},
}
}