38 lines
1.1 KiB
Rust
38 lines
1.1 KiB
Rust
//! `SeaORM` Entity, @generated by sea-orm-codegen 2.0
|
|
|
|
use super::sea_orm_active_enums::{RegistrationStatus, UserGroup};
|
|
use sea_orm::entity::prelude::*;
|
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
|
#[sea_orm(table_name = "user")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub id: i32,
|
|
#[sea_orm(unique)]
|
|
pub osu_id: String,
|
|
#[sea_orm(unique)]
|
|
pub username: String,
|
|
pub registered_at: DateTimeUtc,
|
|
pub avatar_url: Option<String>,
|
|
#[sea_orm(column_type = "Float", nullable)]
|
|
pub pp: Option<f32>,
|
|
pub global_rank: Option<i32>,
|
|
pub country: Option<String>,
|
|
pub country_rank: Option<i32>,
|
|
pub approved: Option<i32>,
|
|
pub user_group: UserGroup,
|
|
pub season: Option<i32>,
|
|
pub registration_status: Option<RegistrationStatus>,
|
|
pub gu_server_user_id: Option<i32>,
|
|
pub gu_server_username: Option<String>,
|
|
pub osu_refresh_token: Option<String>,
|
|
pub gu_refresh_token: Option<String>,
|
|
pub created_at: DateTimeUtc,
|
|
pub updated_at: DateTimeUtc,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|