mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
feat(core/models): add account strikes
This commit is contained in:
24
crates/core/models/src/v0/account_strikes.rs
Normal file
24
crates/core/models/src/v0/account_strikes.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
auto_derived!(
|
||||
/// Account Strike
|
||||
pub struct AccountStrike {
|
||||
/// Strike Id
|
||||
#[serde(rename = "_id")]
|
||||
pub id: String,
|
||||
/// User Id of reported user
|
||||
pub user_id: String,
|
||||
|
||||
/// Attached reason
|
||||
pub reason: String,
|
||||
}
|
||||
);
|
||||
|
||||
#[cfg(feature = "from_database")]
|
||||
impl From<revolt_database::AccountStrike> for AccountStrike {
|
||||
fn from(value: revolt_database::AccountStrike) -> Self {
|
||||
AccountStrike {
|
||||
id: value.id,
|
||||
user_id: value.user_id,
|
||||
reason: value.reason,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
mod account_strikes;
|
||||
mod bots;
|
||||
mod files;
|
||||
mod users;
|
||||
|
||||
pub use account_strikes::*;
|
||||
pub use bots::*;
|
||||
pub use files::*;
|
||||
pub use users::*;
|
||||
|
||||
Reference in New Issue
Block a user