feat: ignore is_delete when serializing to json
This commit is contained in:
@@ -12,6 +12,7 @@ pub struct Category {
|
||||
level: i32,
|
||||
parent_category_id: i64,
|
||||
book_id: i64,
|
||||
#[serde(skip_serializing)]
|
||||
is_delete: bool,
|
||||
create_at: chrono::NaiveDateTime,
|
||||
update_at: chrono::NaiveDateTime,
|
||||
@@ -37,6 +38,7 @@ pub struct Tag {
|
||||
name: String,
|
||||
level: i32,
|
||||
parent_tag_id: i64,
|
||||
#[serde(skip_serializing)]
|
||||
is_delete: bool,
|
||||
create_at: chrono::NaiveDateTime,
|
||||
update_at: chrono::NaiveDateTime,
|
||||
@@ -59,6 +61,7 @@ pub struct Book {
|
||||
id: i64,
|
||||
uid: i64,
|
||||
name: String,
|
||||
#[serde(skip_serializing)]
|
||||
is_delete: bool,
|
||||
create_at: chrono::NaiveDateTime,
|
||||
update_at: chrono::NaiveDateTime,
|
||||
@@ -79,6 +82,7 @@ pub struct Account {
|
||||
uid: i64,
|
||||
name: String,
|
||||
account_type: i64,
|
||||
#[serde(skip_serializing)]
|
||||
is_delete: bool,
|
||||
create_at: chrono::NaiveDateTime,
|
||||
update_at: chrono::NaiveDateTime,
|
||||
@@ -102,6 +106,7 @@ pub struct Transaction {
|
||||
pub description: String,
|
||||
pub category_id: i64,
|
||||
pub time: chrono::DateTime<Utc>,
|
||||
#[serde(skip_serializing)]
|
||||
is_delete: bool,
|
||||
create_at: chrono::NaiveDateTime,
|
||||
update_at: chrono::NaiveDateTime,
|
||||
@@ -129,6 +134,7 @@ pub struct Amount {
|
||||
value: i64,
|
||||
expo: i64,
|
||||
currency: String,
|
||||
#[serde(skip_serializing)]
|
||||
is_delete: bool,
|
||||
create_at: chrono::NaiveDateTime,
|
||||
update_at: chrono::NaiveDateTime,
|
||||
@@ -152,6 +158,7 @@ pub struct User {
|
||||
pub username: String,
|
||||
pub password: String,
|
||||
pub mail: String,
|
||||
#[serde(skip_serializing)]
|
||||
pub is_delete: bool,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user