a06673b
use sea_orm::entity::prelude::*;
use uuid::Uuid;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "channel_overwrite_role")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
#[sea_orm(indexed)]
pub space_id: Uuid,
#[sea_orm(indexed)]
pub channel_id: Uuid,
pub role_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 = "space_id", to = "id")]
pub space: BelongsTo<super::super::space::spaces::Entity>,
#[sea_orm(belongs_to, from = "channel_id", to = "id")]
pub channel: BelongsTo<super::channels::Entity>,
#[sea_orm(belongs_to, from = "role_id", to = "id")]
pub role: BelongsTo<super::super::space::space_roles::Entity>,
}
impl ActiveModelBehavior for ActiveModel {}