//! `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 = "package")] pub struct Model { #[sea_orm(primary_key)] pub id: i32, pub repo_id: i32, pub base: String, pub name: String, pub version: String, pub arch: String, pub size: i64, pub c_size: i64, pub description: Option, pub url: Option, pub build_date: DateTime, pub packager: Option, pub pgp_sig: Option, pub pgp_sig_size: Option, pub sha256_sum: String, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm(has_many = "super::package_conflicts::Entity")] PackageConflicts, #[sea_orm(has_many = "super::package_depends::Entity")] PackageDepends, #[sea_orm(has_many = "super::package_group::Entity")] PackageGroup, #[sea_orm(has_many = "super::package_license::Entity")] PackageLicense, #[sea_orm(has_many = "super::package_provides::Entity")] PackageProvides, #[sea_orm(has_many = "super::package_replaces::Entity")] PackageReplaces, #[sea_orm( belongs_to = "super::repo::Entity", from = "Column::RepoId", to = "super::repo::Column::Id", on_update = "NoAction", on_delete = "Cascade" )] Repo, } impl Related for Entity { fn to() -> RelationDef { Relation::PackageConflicts.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::PackageDepends.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::PackageGroup.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::PackageLicense.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::PackageProvides.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::PackageReplaces.def() } } impl Related for Entity { fn to() -> RelationDef { Relation::Repo.def() } } impl ActiveModelBehavior for ActiveModel {}