mirror of
https://github.com/danbulant/Portfolio
synced 2026-07-06 03:20:53 +00:00
refactor: remove serde json from entities
This commit is contained in:
parent
a36290987d
commit
2aa0330d8c
7 changed files with 13 additions and 9 deletions
|
|
@ -9,7 +9,6 @@ name = "entity"
|
||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { version = "^1.0", features = ["derive"] }
|
|
||||||
chrono = "^0.4"
|
chrono = "^0.4"
|
||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
|
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
|
|
||||||
#[sea_orm(table_name = "candidate")]
|
#[sea_orm(table_name = "candidate")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key, auto_increment = false)]
|
#[sea_orm(primary_key, auto_increment = false)]
|
||||||
pub application: i32,
|
pub application: i32,
|
||||||
#[serde(skip_deserializing, skip_serializing)]
|
|
||||||
pub code: String,
|
pub code: String,
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
pub surname: Option<String>,
|
pub surname: Option<String>,
|
||||||
|
|
@ -23,13 +22,9 @@ pub struct Model {
|
||||||
pub personal_identification_number: Option<String>,
|
pub personal_identification_number: Option<String>,
|
||||||
#[sea_orm(column_type = "Text", nullable)]
|
#[sea_orm(column_type = "Text", nullable)]
|
||||||
pub personal_identification_number_hash: Option<String>,
|
pub personal_identification_number_hash: Option<String>,
|
||||||
#[serde(skip_deserializing, skip_serializing)]
|
|
||||||
pub public_key: String,
|
pub public_key: String,
|
||||||
#[serde(skip_deserializing, skip_serializing)]
|
|
||||||
pub private_key: String,
|
pub private_key: String,
|
||||||
#[serde(skip_deserializing, skip_serializing)]
|
|
||||||
pub created_at: DateTime,
|
pub created_at: DateTime,
|
||||||
#[serde(skip_deserializing, skip_serializing)]
|
|
||||||
pub updated_at: DateTime,
|
pub updated_at: DateTime,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
|
||||||
|
|
||||||
pub mod prelude;
|
pub mod prelude;
|
||||||
|
|
||||||
pub mod admin;
|
pub mod admin;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
|
||||||
|
|
||||||
pub use super::admin::Entity as Admin;
|
pub use super::admin::Entity as Admin;
|
||||||
pub use super::candidate::Entity as Candidate;
|
pub use super::candidate::Entity as Candidate;
|
||||||
pub use super::parent::Entity as Parent;
|
pub use super::parent::Entity as Parent;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
|
||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue