Files
ai_dianshang/server/internal/model/platform.go
2025-11-28 15:18:10 +08:00

22 lines
840 B
Go

package model
import "time"
// Platform 平台配置模型
type Platform struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
Code string `json:"code" gorm:"size:50;uniqueIndex;not null;comment:平台代码,如web,miniprogram"`
Name string `json:"name" gorm:"size:100;not null;comment:平台名称"`
Description string `json:"description" gorm:"size:255;comment:平台描述"`
Icon string `json:"icon" gorm:"size:255;comment:平台图标"`
Sort int `json:"sort" gorm:"default:0;comment:排序值"`
Status int `json:"status" gorm:"default:1;comment:状态:0-禁用,1-启用"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
// TableName 指定表名
func (Platform) TableName() string {
return "ai_platforms"
}