🎨 重构用户端前端为vue开发,完善基础类和角色相关接口
This commit is contained in:
26
server/model/app/ai_file.go
Normal file
26
server/model/app/ai_file.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"git.echol.cn/loser/st/server/global"
|
||||
"gorm.io/datatypes"
|
||||
)
|
||||
|
||||
// AIFile 文件表
|
||||
type AIFile struct {
|
||||
global.GVA_MODEL
|
||||
UserID uint `json:"userId" gorm:"not null;index;comment:上传者ID"`
|
||||
User *AppUser `json:"user" gorm:"foreignKey:UserID"`
|
||||
Filename string `json:"filename" gorm:"type:varchar(500);not null;comment:文件名"`
|
||||
OriginalFilename string `json:"originalFilename" gorm:"type:varchar(500);not null;comment:原始文件名"`
|
||||
FileType string `json:"fileType" gorm:"type:varchar(100);not null;index;comment:文件类型"`
|
||||
MimeType string `json:"mimeType" gorm:"type:varchar(200);comment:MIME类型"`
|
||||
FileSize int64 `json:"fileSize" gorm:"comment:文件大小(字节)"`
|
||||
StoragePath string `json:"storagePath" gorm:"type:varchar(1024);not null;comment:存储路径"`
|
||||
URL string `json:"url" gorm:"type:varchar(1024);comment:对象存储URL"`
|
||||
RelatedTo datatypes.JSON `json:"relatedTo" gorm:"type:jsonb;comment:关联对象"`
|
||||
Metadata datatypes.JSON `json:"metadata" gorm:"type:jsonb;comment:元数据"`
|
||||
}
|
||||
|
||||
func (AIFile) TableName() string {
|
||||
return "ai_files"
|
||||
}
|
||||
Reference in New Issue
Block a user