Implement file sharing functionality with public share links and associated API endpoints
This commit is contained in:
20
go_cloud/internal/models/file_share_link.go
Normal file
20
go_cloud/internal/models/file_share_link.go
Normal 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user