Alisa/crates/entity/src/user.rs

20 lines
487 B
Rust
Raw Normal View History

2024-07-05 15:15:09 +02:00
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.15
use sea_orm::entity::prelude::*;
2024-07-05 16:08:59 +02:00
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "user")]
2024-07-05 15:15:09 +02:00
pub struct Model {
2024-07-05 16:08:59 +02:00
#[sea_orm(primary_key, auto_increment = false)]
2024-07-05 15:15:09 +02:00
pub id: Uuid,
pub name: String,
2024-07-05 16:08:59 +02:00
#[sea_orm(unique)]
2024-07-05 15:15:09 +02:00
pub email: String,
pub hash: String,
}
2024-07-05 16:08:59 +02:00
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
2024-07-05 15:15:09 +02:00
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}