初始化

This commit is contained in:
2026-07-03 15:58:29 +08:00
parent 3a942c882e
commit dc90e889e1
77 changed files with 12912 additions and 0 deletions

23
server/model/share.go Normal file
View File

@@ -0,0 +1,23 @@
package model
import "time"
// Share 文件分享模型
type Share struct {
ID uint64 `json:"id" gorm:"primaryKey;autoIncrement"`
FileID uint64 `json:"file_id" gorm:"not null"`
OwnerID uint64 `json:"owner_id" gorm:"not null"`
ShareCode string `json:"share_code" gorm:"uniqueIndex;size:32;not null"`
Password string `json:"password,omitempty" gorm:"size:64"`
ExpireAt *time.Time `json:"expire_at"`
MaxDownload int `json:"max_download"`
DownloadCount int `json:"download_count"`
AllowPreview int8 `json:"allow_preview"` // 1=允许预览 0=禁止预览
AllowDownload int8 `json:"allow_download"` // 1=允许下载 0=禁止下载
Status int8 `json:"status"`
CreatedAt time.Time `json:"created_at"`
}
func (Share) TableName() string {
return "fs_share"
}