//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.1 use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] #[sea_orm(table_name = "distro")] pub struct Model { #[sea_orm(primary_key)] pub id: i32, #[sea_orm(unique)] pub slug: String, #[sea_orm(unique)] pub name: String, pub description: Option, pub url: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm(has_many = "super::repo::Entity")] Repo, } impl Related for Entity { fn to() -> RelationDef { Relation::Repo.def() } } impl ActiveModelBehavior for ActiveModel {}