refactor: reorganize modules and add Linux build tooling

This commit is contained in:
2026-08-09 12:41:08 +08:00
parent 86024fa81d
commit 5cc5fd92ed
1461 changed files with 4054 additions and 4724 deletions

View File

@@ -0,0 +1,32 @@
package models
import (
"time"
"git.apinb.com/bsm-sdk/core/database"
"git.apinb.com/bsm-sdk/engine/types"
)
// 照片模型
type CloudPhoto struct {
types.Std_IICUDS
CloudBase
AlbumID uint `gorm:"index" json:"album_id"` // 专辑ID
Title string `gorm:"size:100" json:"title"` // 照片标题
Description string `gorm:"size:500" json:"description"` // 照片描述
FilePath string `gorm:"size:500" json:"file_path"` // 文件路径
FileSize int64 `json:"file_size"` // 文件大小
MimeType string `gorm:"size:100" json:"mime_type"` // 文件类型
Width int `json:"width"` // 图片宽度
Height int `json:"height"` // 图片高度
TakenAt time.Time `json:"taken_at"` // 拍摄时间
Location string `gorm:"size:200" json:"location"` // 拍摄地点
Tags string `gorm:"size:500" json:"tags"` // 标签,逗号分隔
// 关联关系
Album CloudAlbum `gorm:"foreignKey:AlbumID" json:"album"`
}
func init() {
database.AppendMigrate(&CloudPhoto{})
}