feat: import services and standardize Go 1.26.5
This commit is contained in:
27
apps/base/cloud/internal/models/cloud_share.go
Normal file
27
apps/base/cloud/internal/models/cloud_share.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.apinb.com/bsm-sdk/core/database"
|
||||
"git.apinb.com/bsm-sdk/engine/types"
|
||||
)
|
||||
|
||||
// 分享系统模型
|
||||
type CloudShare struct {
|
||||
types.Std_IICUDS
|
||||
types.Std_Passport
|
||||
CloudBase
|
||||
ShareType string `gorm:"size:20" json:"share_type"` // file, album, note, etc.
|
||||
ResourceID uint `json:"resource_id"` // 对应资源的ID
|
||||
ShareToken string `gorm:"uniqueIndex;size:32" json:"share_token"` // 分享令牌
|
||||
Password string `gorm:"size:100" json:"password"` // 可选分享密码
|
||||
ExpiresAt time.Time `json:"expires_at"` // 过期时间
|
||||
ViewCount int `gorm:"default:0" json:"view_count"` // 浏览次数
|
||||
DownloadCount int `gorm:"default:0" json:"download_count"` // 下载次数
|
||||
IsPublic bool `gorm:"default:false" json:"is_public"` // 是否公开
|
||||
}
|
||||
|
||||
func init() {
|
||||
database.AppendMigrate(&CloudShare{})
|
||||
}
|
||||
Reference in New Issue
Block a user