kellnr-migration 5.14.0

Kellnr is a self-hosted registry for Rust crates with support for rustdocs and crates.io caching.
Documentation
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.16

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

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

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

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

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

impl ActiveModelBehavior for ActiveModel {}