Reorganize source files of collab::db

* Move all sea_orm tables into a 'tables' module
* Move TestDb into its own file
* Move id types into their own module
This commit is contained in:
Max Brunsfeld 2023-08-18 16:23:33 -07:00
parent e48bb1853c
commit e964137d79
27 changed files with 397 additions and 412 deletions

View file

@ -0,0 +1,15 @@
use crate::db::ChannelId;
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, Default, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "channel_paths")]
pub struct Model {
#[sea_orm(primary_key)]
pub id_path: String,
pub channel_id: ChannelId,
}
impl ActiveModelBehavior for ActiveModel {}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}