regalade/src/entity/user.rs

28 lines
790 B
Rust

//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
#[sea_orm(unique)]
pub name: String,
#[sea_orm(column_type = "Binary(BlobSize::Blob(None))")]
pub password: Vec<u8>,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl Related<super::household::Entity> for Entity {
fn to() -> RelationDef {
super::household_members::Relation::Household.def()
}
fn via() -> Option<RelationDef> {
Some(super::household_members::Relation::User.def().rev())
}
}
impl ActiveModelBehavior for ActiveModel {}