use sea_orm::{
ActiveModelBehavior, DeriveEntityModel, DerivePrimaryKey, DeriveRelation, EntityTrait,
EnumIter, PrimaryKeyTrait,
};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "session_state")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
#[sea_orm(column_type = "Integer", nullable)]
pub id: i64,
#[sea_orm(column_type = "Text")]
pub cur_namespace: Option<String>,
#[sea_orm(column_type = "Text")]
pub cur_song_value: Option<String>,
#[sea_orm(column_type = "Integer", default_value = 0)]
pub position_ms: i64,
#[sea_orm(column_type = "Text")]
pub play_mode: String,
pub volume: f64,
#[sea_orm(column_type = "Integer")]
pub updated_at: i64,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}