refactor: reorganize modules and add Linux build tooling
This commit is contained in:
33
module/base/cloud/internal/models/cloud_space.go
Normal file
33
module/base/cloud/internal/models/cloud_space.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"git.apinb.com/bsm-sdk/core/database"
|
||||
"git.apinb.com/bsm-sdk/engine/types"
|
||||
)
|
||||
|
||||
// 系统统计和配置模型
|
||||
type CloudSpace struct {
|
||||
types.Std_IICUDS
|
||||
types.Std_Passport
|
||||
KeyIdentifier string `gorm:"uniqueIndex;size:32" json:"key_identifier"`
|
||||
TotalStorage int64 `json:"total_storage"` // 总存储空间
|
||||
UsedStorage int64 `json:"used_storage"` // 已用存储空间
|
||||
MaxStorage int64 `json:"max_storage"` // 最大存储空间
|
||||
FileCount int `json:"file_count"` // 文件数量
|
||||
AlbumCount int `json:"album_count"` // 相册数量
|
||||
PhotoCount int `json:"photo_count"` // 照片数量
|
||||
NoteCount int `json:"note_count"` // 笔记数量
|
||||
BookmarkCount int `json:"bookmark_count"` // 书签数量
|
||||
PrivateCount int `json:"private_count"` // 私有数量
|
||||
|
||||
CloudDiskDirectorys []CloudDiskDir `gorm:"foreignKey:PassportID" json:"cloud_disk_dirs"` // 关联云盘目录
|
||||
Albums []CloudAlbum `gorm:"foreignKey:PassportID" json:"cloud_albums"` // 关联相册
|
||||
Notes []CloudNote `gorm:"foreignKey:PassportID" json:"cloud_notes"` // 关联笔记
|
||||
Bookmarks []CloudBookmark `gorm:"foreignKey:PassportID" json:"cloud_bookmarks"` // 关联书签
|
||||
PrivateData []CloudPrivate `gorm:"foreignKey:PassportID" json:"cloud_private"` // 关联私有数据
|
||||
Shares []CloudShare `gorm:"foreignKey:PassportID" json:"cloud_shares"` // 关联分享
|
||||
}
|
||||
|
||||
func init() {
|
||||
database.AppendMigrate(&CloudSpace{})
|
||||
}
|
||||
Reference in New Issue
Block a user