forked from jmug/stoatchat
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 bots;
|
||||||
mod files;
|
mod files;
|
||||||
mod users;
|
mod users;
|
||||||
|
|
||||||
|
pub use account_strikes::*;
|
||||||
pub use bots::*;
|
pub use bots::*;
|
||||||
pub use files::*;
|
pub use files::*;
|
||||||
pub use users::*;
|
pub use users::*;
|
||||||
|
|||||||
Reference in New Issue
Block a user