refactor: remove serde json from entities

This commit is contained in:
Sebastian Pravda 2022-10-29 23:03:31 +02:00
parent a36290987d
commit 2aa0330d8c
No known key found for this signature in database
GPG key ID: F3BC84F08EFA3F57
7 changed files with 13 additions and 9 deletions

View file

@ -9,7 +9,6 @@ name = "entity"
path = "src/lib.rs"
[dependencies]
serde = { version = "^1.0", features = ["derive"] }
chrono = "^0.4"
[dependencies.sea-orm]

View file

@ -1,3 +1,5 @@
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]

View file

@ -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,
}

View file

@ -1,3 +1,5 @@
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
pub mod prelude;
pub mod admin;

View file

@ -1,3 +1,5 @@
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]

View file

@ -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;

View file

@ -1,3 +1,5 @@
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]