35 lines
936 B
Rust
35 lines
936 B
Rust
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.10
|
|
|
|
use sea_orm::entity::prelude::*;
|
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
|
#[sea_orm(table_name = "members")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key, auto_increment = false)]
|
|
pub id: i32,
|
|
#[sea_orm(column_name = "ntnuUsername")]
|
|
pub ntnu_username: String,
|
|
#[sea_orm(column_name = "firstName")]
|
|
pub first_name: String,
|
|
#[sea_orm(column_name = "lastName")]
|
|
pub last_name: String,
|
|
pub email: String,
|
|
pub balance: i32,
|
|
#[sea_orm(column_name = "imagePreference")]
|
|
pub image_preference: String,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {
|
|
#[sea_orm(has_many = "super::rfid_cards::Entity")]
|
|
RfidCards,
|
|
}
|
|
|
|
impl Related<super::rfid_cards::Entity> for Entity {
|
|
fn to() -> RelationDef {
|
|
Relation::RfidCards.def()
|
|
}
|
|
}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|