//! SeaORM Entity. Generated by sea-orm-codegen 0.1.0

use sea_orm::entity::prelude::*;

#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "cake_filling")]
pub struct Model {
    #[sea_orm(primary_key, auto_increment = false)]
    pub cake_id: i32,
    #[sea_orm(primary_key, auto_increment = false)]
    pub filling_id: i32,
    #[sea_orm(
        belongs_to,
        from = "cake_id",
        to = "id",
        on_update = "Cascade",
        on_delete = "Cascade"
    )]
    pub cake: BelongsTo<super::cake::Entity>,
    #[sea_orm(
        belongs_to,
        from = "filling_id",
        to = "id",
        on_update = "Cascade",
        on_delete = "Cascade"
    )]
    pub filling: BelongsTo<super::filling::Entity>,
}

impl ActiveModelBehavior for ActiveModel {}
