Ecto schema for a media asset.
A MediaAsset represents a single uploaded file moving through the
asset lifecycle. Each row tracks the asset's current
state, MIME type, byte size, and the storage key under which the
original file is stored.
States
| State | Meaning |
|---|---|
"staged" | Reserved slot; upload has not been verified. |
"validating" | Upload verified; MIME scan in progress. |
"analyzing" | Dimensions / metadata extraction in progress. |
"promoting" | Promotion job running. |
"available" | Ready for variant processing and delivery. |
"processing" | One or more variant jobs running. |
"ready" | All configured variants generated. |
"degraded" | One or more variants failed; original still deliverable. |
"quarantined" | MIME mismatch or scan failure; not deliverable. |
"deleted" | Soft-deleted; storage object may already be purged. |
See the state table below for the supported lifecycle transitions.
Summary
Functions
Builds a changeset for an asset row.
Types
@type t() :: %Rindle.Domain.MediaAsset{ __meta__: term(), attachments: term(), byte_size: term(), content_type: term(), duration_ms: term(), error_reason: term(), filename: term(), has_audio_track: term(), has_video_track: term(), height: term(), id: term(), inserted_at: term(), kind: term(), metadata: term(), processing_runs: term(), profile: term(), recipe_digest: term(), state: term(), storage_key: term(), updated_at: term(), upload_sessions: term(), variants: term(), width: term() }
Functions
@spec changeset( t() | %Rindle.Domain.MediaAsset{ __meta__: term(), attachments: term(), byte_size: term(), content_type: term(), duration_ms: term(), error_reason: term(), filename: term(), has_audio_track: term(), has_video_track: term(), height: term(), id: term(), inserted_at: term(), kind: term(), metadata: term(), processing_runs: term(), profile: term(), recipe_digest: term(), state: term(), storage_key: term(), updated_at: term(), upload_sessions: term(), variants: term(), width: term() }, map() ) :: Ecto.Changeset.t()
Builds a changeset for an asset row.
Casts the writable lifecycle and storage fields, requires the minimum
promotion-time invariants (:state, :storage_key, :profile), and
validates the lifecycle state against the canonical state list.