mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-08-24 19:53:18 +00:00
Initial support for soft deletes
This commit is contained in:
parent
5a390a973f
commit
e3b00b59a7
11 changed files with 126 additions and 25 deletions
|
@ -34,6 +34,7 @@ pub struct Cipher {
|
|||
|
||||
pub favorite: bool,
|
||||
pub password_history: Option<String>,
|
||||
pub deleted_at: Option<NaiveDateTime>,
|
||||
}
|
||||
|
||||
/// Local methods
|
||||
|
@ -58,6 +59,7 @@ impl Cipher {
|
|||
|
||||
data: String::new(),
|
||||
password_history: None,
|
||||
deleted_at: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -108,6 +110,7 @@ impl Cipher {
|
|||
"Id": self.uuid,
|
||||
"Type": self.atype,
|
||||
"RevisionDate": format_date(&self.updated_at),
|
||||
"DeletedDate": self.deleted_at.map_or(Value::Null, |d| Value::String(format_date(&d))),
|
||||
"FolderId": self.get_folder_uuid(&user_uuid, &conn),
|
||||
"Favorite": self.favorite,
|
||||
"OrganizationId": self.organization_uuid,
|
||||
|
|
|
@ -22,6 +22,7 @@ table! {
|
|||
data -> Text,
|
||||
favorite -> Bool,
|
||||
password_history -> Nullable<Text>,
|
||||
deleted_at -> Nullable<Datetime>,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ table! {
|
|||
data -> Text,
|
||||
favorite -> Bool,
|
||||
password_history -> Nullable<Text>,
|
||||
deleted_at -> Nullable<Timestamp>,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ table! {
|
|||
data -> Text,
|
||||
favorite -> Bool,
|
||||
password_history -> Nullable<Text>,
|
||||
deleted_at -> Nullable<Timestamp>,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue