Initial version of pools

This commit is contained in:
Bad Manners 2025-04-09 22:31:32 -03:00
parent fe7edb93ad
commit 2b6b1f30f4
21 changed files with 577 additions and 36 deletions

View file

@ -15,10 +15,18 @@ pub struct Model {
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(has_many = "super::samey_pool::Entity")]
SameyPool,
#[sea_orm(has_many = "super::samey_post::Entity")]
SameyPost,
}
impl Related<super::samey_pool::Entity> for Entity {
fn to() -> RelationDef {
Relation::SameyPool.def()
}
}
impl Related<super::samey_post::Entity> for Entity {
fn to() -> RelationDef {
Relation::SameyPost.def()