refactor: reorganize modules and add Linux build tooling
This commit is contained in:
24
module/base/cloud/internal/models/cloud_album.go
Normal file
24
module/base/cloud/internal/models/cloud_album.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"git.apinb.com/bsm-sdk/core/database"
|
||||
"git.apinb.com/bsm-sdk/engine/types"
|
||||
)
|
||||
|
||||
// 相册模型
|
||||
type CloudAlbum struct {
|
||||
types.Std_IICUDS
|
||||
types.Std_Passport
|
||||
CloudBase
|
||||
Name string `gorm:"size:100" json:"name"` // 相册名称
|
||||
Description string `gorm:"size:500" json:"description"` // 相册描述
|
||||
CoverPhoto string `gorm:"size:255" json:"cover_photo"` // 封面照片URL
|
||||
IsPrivate bool `gorm:"default:false" json:"is_private"` // 是否私有
|
||||
|
||||
// 关联关系
|
||||
Photos []CloudPhoto `gorm:"foreignKey:AlbumID" json:"photos"` // 相册下的照片
|
||||
}
|
||||
|
||||
func init() {
|
||||
database.AppendMigrate(&CloudAlbum{})
|
||||
}
|
||||
Reference in New Issue
Block a user