sidebar and shit

This commit is contained in:
Priec
2026-06-16 22:02:07 +02:00
parent f0a6f97609
commit b255e95051
13 changed files with 363 additions and 50 deletions

View File

@@ -18,12 +18,21 @@ pub struct Model {
pub image_id: Option<String>,
pub position: i32,
pub published: bool,
pub parent_id: Option<i32>,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(has_many = "super::products::Entity")]
Products,
#[sea_orm(
belongs_to = "Entity",
from = "Column::ParentId",
to = "Column::Id",
on_update = "Cascade",
on_delete = "SetNull"
)]
Parent,
}
impl Related<super::products::Entity> for Entity {