pub struct ModelEx {
pub id: ShowId,
pub parent_id: Option<CollectionId>,
pub library_id: LibraryId,
pub directory: PathBytes,
pub relative_poster_path: Option<String>,
pub parent: HasOne<Entity>,
pub library: HasOne<Entity>,
pub info: HasOne<Entity>,
pub seasons: HasMany<Entity>,
pub episodes: HasMany<Entity>,
pub watched: HasMany<Entity>,
}Expand description
The database representation of a show media folder
Fields§
§id: ShowIdThe show’s ID
parent_id: Option<CollectionId>The show’s parent
library_id: LibraryIdThe show’s library
directory: PathBytesThe show’s directory
relative_poster_path: Option<String>The show’s poster path
parent: HasOne<Entity>This show’s parent
library: HasOne<Entity>The library this show belongs to
info: HasOne<Entity>The info for this show
seasons: HasMany<Entity>Seasons that are part of this show
episodes: HasMany<Entity>Episodes that are part of this show
watched: HasMany<Entity>The watched info for this show
Implementations§
Source§impl ModelEx
impl ModelEx
Sourcepub async fn delete<'a, C>(self, db: &'a C) -> Result<DeleteResult, DbErr>where
C: TransactionTrait,
pub async fn delete<'a, C>(self, db: &'a C) -> Result<DeleteResult, DbErr>where
C: TransactionTrait,
Generated by sea-orm-macros
Trait Implementations§
Source§impl From<ModelEx> for ActiveModelEx
impl From<ModelEx> for ActiveModelEx
Source§impl IntoActiveModel<ActiveModelEx> for ModelEx
impl IntoActiveModel<ActiveModelEx> for ModelEx
Source§fn into_active_model(self) -> ActiveModelEx
fn into_active_model(self) -> ActiveModelEx
Method to call to perform the conversion
Source§impl ModelTrait for ModelEx
impl ModelTrait for ModelEx
type Entity = Entity
Source§fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> Value
fn get(&self, c: <Self::Entity as EntityTrait>::Column) -> Value
Get the Value of a column from a Model
Source§fn get_value_type(c: <Self::Entity as EntityTrait>::Column) -> ArrayType
fn get_value_type(c: <Self::Entity as EntityTrait>::Column) -> ArrayType
Get the Value Type of a column from the Model
Source§fn try_set(
&mut self,
c: <Self::Entity as EntityTrait>::Column,
v: Value,
) -> Result<(), DbErr>
fn try_set( &mut self, c: <Self::Entity as EntityTrait>::Column, v: Value, ) -> Result<(), DbErr>
Set the Value of a Model field, return error if failed
Source§fn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value)
fn set(&mut self, c: <Self::Entity as EntityTrait>::Column, v: Value)
Set the Value of a Model field, panic if failed
Find related Models belonging to self
Source§fn find_linked<L>(&self, l: L) -> Select<<L as Linked>::ToEntity>
fn find_linked<L>(&self, l: L) -> Select<<L as Linked>::ToEntity>
Find linked Models belonging to self
Source§fn delete<'a, 'async_trait, A, C>(
self,
db: &'a C,
) -> Pin<Box<dyn Future<Output = Result<DeleteResult, DbErr>> + Send + 'async_trait>>where
'a: 'async_trait,
Self: IntoActiveModel<A> + 'async_trait,
C: ConnectionTrait + 'async_trait,
A: ActiveModelTrait<Entity = Self::Entity> + ActiveModelBehavior + Send + 'a + 'async_trait,
fn delete<'a, 'async_trait, A, C>(
self,
db: &'a C,
) -> Pin<Box<dyn Future<Output = Result<DeleteResult, DbErr>> + Send + 'async_trait>>where
'a: 'async_trait,
Self: IntoActiveModel<A> + 'async_trait,
C: ConnectionTrait + 'async_trait,
A: ActiveModelTrait<Entity = Self::Entity> + ActiveModelBehavior + Send + 'a + 'async_trait,
Delete a model
Source§fn get_primary_key_value(&self) -> ValueTuple
fn get_primary_key_value(&self) -> ValueTuple
Get the primary key value of the Model
Source§impl TryFrom<ActiveModelEx> for ModelEx
impl TryFrom<ActiveModelEx> for ModelEx
Source§impl TryIntoModel<ModelEx> for ActiveModelEx
impl TryIntoModel<ModelEx> for ActiveModelEx
Auto Trait Implementations§
impl Freeze for ModelEx
impl RefUnwindSafe for ModelEx
impl Send for ModelEx
impl Sync for ModelEx
impl Unpin for ModelEx
impl UnwindSafe for ModelEx
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<M> TryIntoModel<M> for Mwhere
M: ModelTrait,
impl<M> TryIntoModel<M> for Mwhere
M: ModelTrait,
Source§fn try_into_model(self) -> Result<M, DbErr>
fn try_into_model(self) -> Result<M, DbErr>
Method to call to perform the conversion