27 lines
655 B
Rust
27 lines
655 B
Rust
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.1
|
|
|
|
use sea_orm::entity::prelude::*;
|
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
|
#[sea_orm(table_name = "playlists")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub id: i32,
|
|
pub name: Option<String>,
|
|
pub sort_order: Option<String>,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {
|
|
#[sea_orm(has_many = "super::playlist_entries::Entity")]
|
|
PlaylistEntries,
|
|
}
|
|
|
|
impl Related<super::playlist_entries::Entity> for Entity {
|
|
fn to() -> RelationDef {
|
|
Relation::PlaylistEntries.def()
|
|
}
|
|
}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|