librmo 0.4.4

A library to manage media files and play them
Documentation
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.15

use sea_orm::entity::prelude::*;

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "track")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i32,
    pub mb_release_id: String,
    pub mb_release_group_id: String,
    pub mb_recording_id: String,
    pub mb_track_id: String,
    pub title: String,
    pub track_num: String,
    pub disc_num: String,
    pub music_id: i32,
    pub album_id: Option<i32>,
    pub length_ms: u32,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
    #[sea_orm(
        belongs_to = "super::music::Entity",
        from = "Column::MusicId",
        to = "super::music::Column::Id",
        on_update = "NoAction",
        on_delete = "Cascade"
    )]
    Music,
}

impl Related<super::music::Entity> for Entity {
    fn to() -> RelationDef {
        Relation::Music.def()
    }
}

impl ActiveModelBehavior for ActiveModel {}