Skip to main content
The Media entity represents media files such as logos, avatars, or uploaded documents in the Well system. It serves as a central repository for all media assets and their metadata.

Table structure

Table name: medias

Main fields

NameTypeRequiredConstraintsAllowed ValuesDescriptionExample
idstring, UUID, πŸ”’ systemβœ… YesUnique identifier (read-only)–Unique identifier of the media file”media-uuid-123”
media_typeenumβœ… YesFixed enum valuesavatar, logo, bannerType of media asset”avatar”
is_primarybooleanβšͺ No–true/falseMarks preferred media (default: true)true
urlstring (URL)βœ… YesValid URL format–Direct media URL for access”https://storage.example.com/media/logo.png”
uploaded_atstring (ISO 8601) πŸ”’ system–auto timestamp–Upload timestamp”2023-01-01T12:00:00Z”
processed_atstring (ISO 8601) πŸ”’ system–auto timestamp–Processing completion timestamp”2024-01-01T12:00:00Z”
deleted_atstring | null πŸ”’ systemβšͺ Nonullable ISO 8601–Deletion timestamp (soft delete)β€œ2024-01-01T12:00:00Z”

Relations

The Media entity has relationships with multiple entities:

Many-to-Many relations

  • MediaPerson: Links with people for avatars and profile images
  • MediaCompany: Links with companies for logos and banners
  • MediaWorkspace: Links with workspaces for workspace-specific media
  • MediaInvoiceItem: Links with invoice items for associated media files

Relationship schema

Media (N) ←→ (N) MediaPerson ←→ (1) People
Media (N) ←→ (N) MediaCompany ←→ (1) Company
Media (N) ←→ (N) MediaWorkspace ←→ (1) Workspace
Media (N) ←→ (N) MediaInvoiceItem ←→ (1) InvoiceItem
⌘I