refactor: reorganize modules and add Linux build tooling
This commit is contained in:
32
module/base/cloud/internal/models/cloud_photo.go
Normal file
32
module/base/cloud/internal/models/cloud_photo.go
Normal 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{})
|
||||
}
|
||||
Reference in New Issue
Block a user