540871a8cdc2c7df89bd3c0f5eb39387359db062 / frogue / src / entities / users.rs
Raw
// SPDX-FileCopyrightText: 2026 Ololduck <ololduck@vit.am> and contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
//! `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 {}