mirror of
https://github.com/pocketpaw/pocketpaw.git
synced 2026-05-21 01:04:57 +00:00
23 lines
532 B
Python
23 lines
532 B
Python
"""File metadata document — pre-signed URL storage."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from beanie import Document, Indexed
|
|
from pydantic import Field
|
|
|
|
|
|
class FileObj(Document):
|
|
"""File metadata — actual bytes live in S3/GCS, not MongoDB."""
|
|
|
|
owner: Indexed(str) # type: ignore[valid-type]
|
|
file_name: str
|
|
bucket: str
|
|
provider: str = Field(pattern="^(gcs|s3|local)$")
|
|
path_in_bucket: str
|
|
mime_type: str = ""
|
|
size: int = 0
|
|
public: bool = False
|
|
|
|
class Settings:
|
|
name = "files"
|