bookclerk_library::entities::playback_sessions
SeaORM entity for playback_sessions: one stretch of listening by one
person on one player. A session is also the leave to stream the
edition's files from one destination, checked afresh on every request
(control_plane::copies::authorize_playback).
| Item | Kind | Summary |
|---|---|---|
Model |
struct | Row shape for one play session. |
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 id: String,
pub user_id: i64,
pub edition_id: String,
pub serving_node_id: String,
pub destination: String,
pub files_digest: String,
pub client_kind: String,
pub client_name: String,
pub start_position_ms: i64,
pub position_ms: i64,
pub listened_ms: i64,
pub started_at: String,
pub updated_at: String,
pub closed_at: Option<String>,
}
Row shape for one play session.
Fields
id: Session id (hyphenated UUID).user_id: The listener (users.id).edition_id: The edition (editions.id) being played.serving_node_id: The node that opened the session and streams its files.destination: The output destination the files are read from.files_digest: Digest of the edition's file rows on that destination when the session opened; a stream request is refused once they differ.client_kind: What kind of player opened it (crate::PlayerKind).client_name: The player's own name for itself, shown in listening history.start_position_ms: Position the session started from, in milliseconds.position_ms: Position at the last sync, in milliseconds.listened_ms: Time spent listening in this session, in milliseconds of wall clock as the player counted it.started_at: RFC 3339 time the session opened.updated_at: RFC 3339 time of the last sync.closed_at: RFC 3339 time the player closed the session;Nonewhile open.
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 id: ActiveValue<String>,
pub user_id: ActiveValue<i64>,
pub edition_id: ActiveValue<String>,
pub serving_node_id: ActiveValue<String>,
pub destination: ActiveValue<String>,
pub files_digest: ActiveValue<String>,
pub client_kind: ActiveValue<String>,
pub client_name: ActiveValue<String>,
pub start_position_ms: ActiveValue<i64>,
pub position_ms: ActiveValue<i64>,
pub listened_ms: ActiveValue<i64>,
pub started_at: ActiveValue<String>,
pub updated_at: ActiveValue<String>,
pub closed_at: ActiveValue<Option<String>>,
}
Generated by sea-orm-macros
Fields
id: Generated by sea-orm-macrosuser_id: Generated by sea-orm-macrosedition_id: Generated by sea-orm-macrosserving_node_id: Generated by sea-orm-macrosdestination: Generated by sea-orm-macrosfiles_digest: Generated by sea-orm-macrosclient_kind: Generated by sea-orm-macrosclient_name: Generated by sea-orm-macrosstart_position_ms: Generated by sea-orm-macrosposition_ms: Generated by sea-orm-macroslistened_ms: Generated by sea-orm-macrosstarted_at: Generated by sea-orm-macrosupdated_at: Generated by sea-orm-macrosclosed_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 {
Id,
UserId,
EditionId,
ServingNodeId,
Destination,
FilesDigest,
ClientKind,
ClientName,
StartPositionMs,
PositionMs,
ListenedMs,
StartedAt,
UpdatedAt,
ClosedAt,
}
Generated by sea-orm-macros
Variants
Id: Generated by sea-orm-macrosUserId: Generated by sea-orm-macrosEditionId: Generated by sea-orm-macrosServingNodeId: Generated by sea-orm-macrosDestination: Generated by sea-orm-macrosFilesDigest: Generated by sea-orm-macrosClientKind: Generated by sea-orm-macrosClientName: Generated by sea-orm-macrosStartPositionMs: Generated by sea-orm-macrosPositionMs: Generated by sea-orm-macrosListenedMs: Generated by sea-orm-macrosStartedAt: Generated by sea-orm-macrosUpdatedAt: Generated by sea-orm-macrosClosedAt: Generated by sea-orm-macros
Implements: Clone, ColumnTrait, Copy, Debug, FromStr, Iden, IdenStatic, IntoEnumIterator
pub enum PrimaryKey {
Id,
}
Generated by sea-orm-macros
Variants
Id: 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