//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0.0-rc.14

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

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

impl ActiveModelBehavior for ActiveModel {}
