- PostgreSQL metadata overlay layer on top of existing S3 storage - 3 new tables: folders, files, share_links - Folder CRUD: create, get with children, tree, rename, delete (cascade) - File operations: upload to folder, move between folders - Share links: create with optional password/expiry/download limit, public access - S3 compensation on PG write failure - Existing 14 endpoints untouched
26 lines
433 B
Go
26 lines
433 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
type ShareLink struct {
|
|
ID string
|
|
ResourceType string
|
|
ResourceID string
|
|
Token string
|
|
Password *string
|
|
ExpiresAt *time.Time
|
|
DownloadCount int
|
|
MaxDownloads *int
|
|
CreatedBy string
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
type ShareInfo struct {
|
|
Token string
|
|
ResourceType string
|
|
FileName string
|
|
FileSize int64
|
|
HasPassword bool
|
|
ExpiresAt *time.Time
|
|
}
|