bookclerk_library::entities::edition_files
SeaORM entity for edition_files: every file key an acquire or a host
upload wrote, per output destination, and the edition it belongs to
(library data model ADR, docs/adr/library-data-model.md,
section 3). Written by the acquire pipeline
(crate::LibraryStore::record_edition_file) and by
control_plane::uploads, which refuses an upload a key another edition
holds and deletes an aborted upload's copy only while the key is still
its own.
| Item | Kind | Summary |
|---|---|---|
Model |
struct | Row shape for one recorded file key. |
ColumnIter |
struct | An iterator over the variants of [Column] |
Entity |
struct | Generated by sea-orm-macros |
PrimaryKeyIter |
struct | An iterator over the variants of [PrimaryKey] |
ActiveModel |
struct | Generated by sea-orm-macros |
RelationIter |
struct | An iterator over the variants of [Relation] |
Column |
enum | Generated by sea-orm-macros |
PrimaryKey |
enum | Generated by sea-orm-macros |
Relation |
enum | Declared SeaORM relations (none). |
pub struct Model {
pub destination: String,
pub storage_key: String,
pub owner_kind: String,
pub owner_id: String,
pub role: String,
pub lossless: i64,
pub bitrate_kbps: Option<i64>,
pub content_type: Option<String>,
pub source_store: Option<String>,
pub probed_at: Option<String>,
pub sha256: Option<String>,
pub copy_format: Option<String>,
pub copy_quality: Option<String>,
pub codec: Option<String>,
pub aac_profile: Option<String>,
pub channels: Option<i64>,
pub sample_rate_hz: Option<i64>,
pub duration_ms: Option<i64>,
pub writer: String,
pub written_at: String,
}
Row shape for one recorded file key.
Fields
destination: Output destination id (local,s3).storage_key: Storage key on that destination.owner_kind:edition: files belong to editions.owner_id: The edition id.role: What the file is (crate::FileRole).lossless: 1 for a lossless audio encoding; 0 otherwise or unknown (an integer, as every flag column is, so each database adapter decodes it alike).bitrate_kbps: Average audio bitrate in kilobits per second, once probed.content_type: Media type of the file (audio/mp4,audio/mpeg,audio/flac), once probed.source_store: Plain id of the storefront the copy was downloaded from (audible,libro), when the writer knew it.probed_at: RFC 3339 time the probe result was stored;Noneuntil the file has been probed.sha256: Lowercase hex SHA-256 of the content, when known (host uploads).copy_format: Format of the library copy (output.copies) this audio file belongs to (m4b,mp3,mp3_chapters,original);Nonefor a file of no one copy (a sidecar, the PDF) or an upload.copy_quality: Quality of that copy (original,64k-mono,v2);Noneexactly whenSelf::copy_formatis.codec: The audio encoding a probe found (aac,mp3,opus, ...), once probed and when the tag reader knows it.aac_profile: The AAC profile (lc,he,he_v2,xhe) of an AAC file whose decoder configuration names one.channels: Output channels, when the headers state them.sample_rate_hz: Output sample rate in hertz, when the headers state it.duration_ms: The running time a player sees, in milliseconds; null when unknown, never zero.writer: The host upload id that claimed the key last, orcrate::store::ACQUIRE_WRITERfor an acquire run on this node.written_at: RFC 3339 time of the latest claim.
pub fn into_ex(self) -> Self
Generated by sea-orm-macros
Implements: Clone, Debug, Eq, From<Model>, FromQueryResult, IntoActiveModel<ActiveModel>, ModelTrait, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>
pub struct ColumnIter {
/* private fields */
}
An iterator over the variants of Column
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub struct Entity;
Generated by sea-orm-macros
Implements: Clone, Copy, Debug, Default, EntityName, EntityTrait, Iden, IdenStatic
pub struct PrimaryKeyIter {
/* private fields */
}
An iterator over the variants of PrimaryKey
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub struct ActiveModel {
pub destination: ActiveValue<String>,
pub storage_key: ActiveValue<String>,
pub owner_kind: ActiveValue<String>,
pub owner_id: ActiveValue<String>,
pub role: ActiveValue<String>,
pub lossless: ActiveValue<i64>,
pub bitrate_kbps: ActiveValue<Option<i64>>,
pub content_type: ActiveValue<Option<String>>,
pub source_store: ActiveValue<Option<String>>,
pub probed_at: ActiveValue<Option<String>>,
pub sha256: ActiveValue<Option<String>>,
pub copy_format: ActiveValue<Option<String>>,
pub copy_quality: ActiveValue<Option<String>>,
pub codec: ActiveValue<Option<String>>,
pub aac_profile: ActiveValue<Option<String>>,
pub channels: ActiveValue<Option<i64>>,
pub sample_rate_hz: ActiveValue<Option<i64>>,
pub duration_ms: ActiveValue<Option<i64>>,
pub writer: ActiveValue<String>,
pub written_at: ActiveValue<String>,
}
Generated by sea-orm-macros
Fields
destination: Generated by sea-orm-macrosstorage_key: Generated by sea-orm-macrosowner_kind: Generated by sea-orm-macrosowner_id: Generated by sea-orm-macrosrole: Generated by sea-orm-macroslossless: Generated by sea-orm-macrosbitrate_kbps: Generated by sea-orm-macroscontent_type: Generated by sea-orm-macrossource_store: Generated by sea-orm-macrosprobed_at: Generated by sea-orm-macrossha256: Generated by sea-orm-macroscopy_format: Generated by sea-orm-macroscopy_quality: Generated by sea-orm-macroscodec: Generated by sea-orm-macrosaac_profile: Generated by sea-orm-macroschannels: Generated by sea-orm-macrossample_rate_hz: Generated by sea-orm-macrosduration_ms: Generated by sea-orm-macroswriter: Generated by sea-orm-macroswritten_at: Generated by sea-orm-macros
Implements: ActiveModelBehavior, ActiveModelTrait, Clone, Debug, Default, From<Model>, IntoActiveModel<ActiveModel>, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>
pub struct RelationIter {
/* private fields */
}
An iterator over the variants of Relation
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub enum Column {
Destination,
StorageKey,
OwnerKind,
OwnerId,
Role,
Lossless,
BitrateKbps,
ContentType,
SourceStore,
ProbedAt,
Sha256,
CopyFormat,
CopyQuality,
Codec,
AacProfile,
Channels,
SampleRateHz,
DurationMs,
Writer,
WrittenAt,
}
Generated by sea-orm-macros
Variants
Destination: Generated by sea-orm-macrosStorageKey: Generated by sea-orm-macrosOwnerKind: Generated by sea-orm-macrosOwnerId: Generated by sea-orm-macrosRole: Generated by sea-orm-macrosLossless: Generated by sea-orm-macrosBitrateKbps: Generated by sea-orm-macrosContentType: Generated by sea-orm-macrosSourceStore: Generated by sea-orm-macrosProbedAt: Generated by sea-orm-macrosSha256: Generated by sea-orm-macrosCopyFormat: Generated by sea-orm-macrosCopyQuality: Generated by sea-orm-macrosCodec: Generated by sea-orm-macrosAacProfile: Generated by sea-orm-macrosChannels: Generated by sea-orm-macrosSampleRateHz: Generated by sea-orm-macrosDurationMs: Generated by sea-orm-macrosWriter: Generated by sea-orm-macrosWrittenAt: Generated by sea-orm-macros
Implements: Clone, ColumnTrait, Copy, Debug, FromStr, Iden, IdenStatic, IntoEnumIterator
pub enum PrimaryKey {
Destination,
StorageKey,
}
Generated by sea-orm-macros
Variants
Destination: Generated by sea-orm-macrosStorageKey: Generated by sea-orm-macros
Implements: Clone, Copy, Debug, Iden, IdenStatic, IntoEnumIterator, PrimaryKeyToColumn, PrimaryKeyTrait
pub enum Relation {}
Declared SeaORM relations (none).
Implements: Clone, Copy, Debug, IntoEnumIterator, RelationTrait
Generated from crates/bookclerk-library at main · View as Markdown