|
|
|
@ -25,8 +25,9 @@ use ts_rs::TS;
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = mod_remove_post))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When a moderator removes a post.
|
|
|
|
|
pub struct ModRemovePost {
|
|
|
|
@ -48,8 +49,9 @@ pub struct ModRemovePostForm {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = mod_lock_post))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When a moderator locks a post (prevents new comments being made).
|
|
|
|
|
pub struct ModLockPost {
|
|
|
|
@ -69,8 +71,9 @@ pub struct ModLockPostForm {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = mod_feature_post))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When a moderator features a post on a community (pins it to the top).
|
|
|
|
|
pub struct ModFeaturePost {
|
|
|
|
@ -93,8 +96,9 @@ pub struct ModFeaturePostForm {
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = mod_remove_comment))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When a moderator removes a comment.
|
|
|
|
|
pub struct ModRemoveComment {
|
|
|
|
@ -117,8 +121,9 @@ pub struct ModRemoveCommentForm {
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = mod_remove_community))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When a moderator removes a community.
|
|
|
|
|
pub struct ModRemoveCommunity {
|
|
|
|
@ -141,8 +146,9 @@ pub struct ModRemoveCommunityForm {
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = mod_ban_from_community))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When someone is banned from a community.
|
|
|
|
|
pub struct ModBanFromCommunity {
|
|
|
|
@ -169,8 +175,9 @@ pub struct ModBanFromCommunityForm {
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = mod_ban))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When someone is banned from the site.
|
|
|
|
|
pub struct ModBan {
|
|
|
|
@ -194,8 +201,9 @@ pub struct ModHideCommunityForm {
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = mod_hide_community))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When a community is hidden from public view.
|
|
|
|
|
pub struct ModHideCommunity {
|
|
|
|
@ -218,8 +226,9 @@ pub struct ModBanForm {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = mod_add_community))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When someone is added as a community moderator.
|
|
|
|
|
pub struct ModAddCommunity {
|
|
|
|
@ -241,8 +250,9 @@ pub struct ModAddCommunityForm {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = mod_transfer_community))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When a moderator transfers a community to a new owner.
|
|
|
|
|
pub struct ModTransferCommunity {
|
|
|
|
@ -262,8 +272,9 @@ pub struct ModTransferCommunityForm {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = mod_add))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When someone is added as a site moderator.
|
|
|
|
|
pub struct ModAdd {
|
|
|
|
@ -284,8 +295,9 @@ pub struct ModAddForm {
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = admin_purge_person))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When an admin purges a person.
|
|
|
|
|
pub struct AdminPurgePerson {
|
|
|
|
@ -304,8 +316,9 @@ pub struct AdminPurgePersonForm {
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = admin_purge_community))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When an admin purges a community.
|
|
|
|
|
pub struct AdminPurgeCommunity {
|
|
|
|
@ -324,8 +337,9 @@ pub struct AdminPurgeCommunityForm {
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = admin_purge_post))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When an admin purges a post.
|
|
|
|
|
pub struct AdminPurgePost {
|
|
|
|
@ -346,8 +360,9 @@ pub struct AdminPurgePostForm {
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable, TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = admin_purge_comment))]
|
|
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// When an admin purges a comment.
|
|
|
|
|
pub struct AdminPurgeComment {
|
|
|
|
|