Implement file sharing functionality with public share links and associated API endpoints

This commit is contained in:
Leon Bösche
2026-01-24 21:06:18 +01:00
parent 4770380e38
commit 6bbdc157cb
12 changed files with 883 additions and 7 deletions

View File

@@ -0,0 +1,20 @@
package models
import (
"time"
"github.com/google/uuid"
)
// FileShareLink represents a public share link for a file
type FileShareLink struct {
ID uuid.UUID `json:"id" db:"id"`
Token string `json:"token" db:"token"`
FileID uuid.UUID `json:"file_id" db:"file_id"`
OrgID uuid.UUID `json:"org_id" db:"org_id"`
CreatedByUserID uuid.UUID `json:"created_by_user_id" db:"created_by_user_id"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
ExpiresAt *time.Time `json:"expires_at,omitempty" db:"expires_at"`
IsRevoked bool `json:"is_revoked" db:"is_revoked"`
}