use sea_orm::{
ActiveModelBehavior, DeriveEntityModel, DerivePrimaryKey, DeriveRelation, EntityTrait,
EnumIter, PrimaryKeyTrait,
};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "song_stats")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
#[sea_orm(column_type = "Text")]
pub namespace: String,
#[sea_orm(primary_key, auto_increment = false)]
#[sea_orm(column_type = "Text")]
pub song_value: String,
#[sea_orm(column_type = "Integer", default_value = 0)]
pub play_count: i64,
#[sea_orm(column_type = "Integer", default_value = 0)]
pub skip_count: i64,
#[sea_orm(column_type = "Integer", default_value = 0)]
pub total_listen_ms: i64,
#[sea_orm(column_type = "Integer")]
pub last_played_at: Option<i64>,
#[sea_orm(column_type = "Integer")]
pub rating: Option<i64>,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}