sea-orm-codegen 2.0.0-rc.39

Code Generator for SeaORM
Documentation
//! 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 = "rust_keyword")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i32,
    pub testing: i8,
    pub rust: u8,
    pub keywords: i16,
    pub r#type: u16,
    pub r#typeof: i32,
    pub crate_: u32,
    pub self_: i64,
    pub self_id1: u64,
    pub self_id2: i32,
    pub fruit_id1: i32,
    pub fruit_id2: i32,
    pub cake_id: i32,
    #[sea_orm(self_ref, relation_enum = "SelfRef1", from = "self_id1", to = "id")]
    pub rust_keyword_1: HasOne<Entity> ,
    #[sea_orm(self_ref, relation_enum = "SelfRef2", from = "self_id2", to = "id")]
    pub rust_keyword_2: HasOne<Entity> ,
    #[sea_orm(belongs_to, relation_enum = "Fruit1", from = "fruit_id1", to = "id")]
    pub fruit_1: HasOne<super::fruit::Entity> ,
    #[sea_orm(belongs_to, relation_enum = "Fruit2", from = "fruit_id2", to = "id")]
    pub fruit_2: HasOne<super::fruit::Entity> ,
    #[sea_orm(belongs_to, from = "cake_id", to = "id")]
    pub cake: HasOne<super::cake::Entity> ,
}

impl ActiveModelBehavior for ActiveModel {}