mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-19 06:21:15 +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"
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "^1.0", features = ["derive"] }
|
||||
chrono = "^0.4"
|
||||
|
||||
[dependencies.sea-orm]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[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 serde::{Deserialize, Serialize};
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
||||
#[sea_orm(table_name = "candidate")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub application: i32,
|
||||
#[serde(skip_deserializing, skip_serializing)]
|
||||
pub code: String,
|
||||
pub name: Option<String>,
|
||||
pub surname: Option<String>,
|
||||
|
|
@ -23,13 +22,9 @@ pub struct Model {
|
|||
pub personal_identification_number: Option<String>,
|
||||
#[sea_orm(column_type = "Text", nullable)]
|
||||
pub personal_identification_number_hash: Option<String>,
|
||||
#[serde(skip_deserializing, skip_serializing)]
|
||||
pub public_key: String,
|
||||
#[serde(skip_deserializing, skip_serializing)]
|
||||
pub private_key: String,
|
||||
#[serde(skip_deserializing, skip_serializing)]
|
||||
pub created_at: DateTime,
|
||||
#[serde(skip_deserializing, skip_serializing)]
|
||||
pub updated_at: DateTime,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
|
||||
|
||||
pub mod prelude;
|
||||
|
||||
pub mod admin;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[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::candidate::Entity as Candidate;
|
||||
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::*;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue