Represent channel relationships using paths table
Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
498d043a0a
commit
778fd6b0a9
4 changed files with 80 additions and 78 deletions
|
@ -2,12 +2,11 @@ use super::ChannelId;
|
|||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, DeriveEntityModel)]
|
||||
#[sea_orm(table_name = "channel_parents")]
|
||||
#[sea_orm(table_name = "channel_paths")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key)]
|
||||
pub child_id: ChannelId,
|
||||
#[sea_orm(primary_key)]
|
||||
pub parent_id: ChannelId,
|
||||
pub id_path: String,
|
||||
pub channel_id: ChannelId,
|
||||
}
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
Loading…
Add table
Add a link
Reference in a new issue