//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.17

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

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "crate_category")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i64,
    #[sea_orm(column_type = "Text", unique)]
    pub category: String,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
    #[sea_orm(has_many = "super::crate_category_to_crate::Entity")]
    CrateCategoryToCrate,
}

impl Related<super::crate_category_to_crate::Entity> for Entity {
    fn to() -> RelationDef {
        Relation::CrateCategoryToCrate.def()
    }
}

impl ActiveModelBehavior for ActiveModel {}
