Initial commit
This commit is contained in:
23
src/entity/account.rs
Normal file
23
src/entity/account.rs
Normal file
@ -0,0 +1,23 @@
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "account")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub user_id: i32,
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub name: String,
|
||||
#[sea_orm(column_type = "Binary(BlobSize::Blob(Some(64)))")]
|
||||
pub salt: Vec<u8>,
|
||||
#[sea_orm(column_type = "VarBinary(256)")]
|
||||
pub enc_login: Vec<u8>,
|
||||
#[sea_orm(column_type = "VarBinary(256)")]
|
||||
pub enc_password: Vec<u8>,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
pub enum Relation {}
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
19
src/entity/master_pass.rs
Normal file
19
src/entity/master_pass.rs
Normal file
@ -0,0 +1,19 @@
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[sea_orm(table_name = "master_pass")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub user_id: i32,
|
||||
#[sea_orm(column_type = "Binary(BlobSize::Blob(Some(64)))")]
|
||||
pub salt: Vec<u8>,
|
||||
#[sea_orm(column_type = "Binary(BlobSize::Blob(Some(128)))")]
|
||||
pub password_hash: Vec<u8>,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
pub enum Relation {}
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
6
src/entity/mod.rs
Normal file
6
src/entity/mod.rs
Normal file
@ -0,0 +1,6 @@
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2
|
||||
|
||||
pub mod prelude;
|
||||
|
||||
pub mod account;
|
||||
pub mod master_pass;
|
4
src/entity/prelude.rs
Normal file
4
src/entity/prelude.rs
Normal file
@ -0,0 +1,4 @@
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.2
|
||||
|
||||
pub use super::account::Entity as Account;
|
||||
pub use super::master_pass::Entity as MasterPass;
|
Reference in New Issue
Block a user