9e4c8060df3b9ccf7c74773f14327d4c289e653c / frogue / src / entities / users.rs
Raw
//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0
use sea_orm::entity::prelude::*;
use serde::Serialize;
pub const USER_NAME_MAX_LEN: i32 = 32;
pub const USER_PASSWORD_MAX_LEN: i32 = 32;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize)]
#[sea_orm(table_name = "users")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i64,
#[sea_orm(unique)]
pub uuid: Uuid,
#[sea_orm(unique)]
pub name: String,
#[sea_orm(unique)]
pub email: String,
pub description: Option<String>,
pub created_at: DateTimeWithTimeZone,
pub deleted_at: Option<DateTimeWithTimeZone>,
pub password_hash: String,
pub invited_by: Option<i64>,
#[sea_orm(has_many)]
pub repositories: HasMany<super::repositories::Entity>,
#[sea_orm(has_many)]
pub ssh_keys: HasMany<super::ssh_keys::Entity>,
}
impl ActiveModelBehavior for ActiveModel {}