use sea_orm::entity::prelude::*; use uuid::Uuid; #[sea_orm::model] #[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)] #[sea_orm(table_name = "channel_overwrite_user")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub channel_id: Uuid, #[sea_orm(primary_key, auto_increment = false)] pub user_id: Uuid, #[sea_orm(default_value = "0")] pub allow_mask: i64, #[sea_orm(default_value = "0")] pub deny_mask: i64, #[sea_orm(belongs_to, from = "channel_id", to = "id")] pub channel: BelongsTo, #[sea_orm(belongs_to, from = "user_id", to = "uid")] pub user: BelongsTo, } impl ActiveModelBehavior for ActiveModel {}