1 // @generated automatically by Diesel CLI.
4 #[derive(diesel::sql_types::SqlType)]
5 #[diesel(postgres_type(name = "listing_type_enum"))]
6 pub struct ListingTypeEnum;
8 #[derive(diesel::sql_types::SqlType)]
9 #[diesel(postgres_type(name = "registration_mode_enum"))]
10 pub struct RegistrationModeEnum;
12 #[derive(diesel::sql_types::SqlType)]
13 #[diesel(postgres_type(name = "sort_type_enum"))]
14 pub struct SortTypeEnum;
22 published -> Timestamp,
23 updated -> Nullable<Timestamp>,
30 admin_purge_comment (id) {
32 admin_person_id -> Int4,
34 reason -> Nullable<Text>,
40 admin_purge_community (id) {
42 admin_person_id -> Int4,
43 reason -> Nullable<Text>,
49 admin_purge_person (id) {
51 admin_person_id -> Int4,
52 reason -> Nullable<Text>,
58 admin_purge_post (id) {
60 admin_person_id -> Int4,
62 reason -> Nullable<Text>,
72 published -> Timestamp,
77 use diesel::sql_types::*;
78 use diesel_ltree::sql_types::Ltree;
86 published -> Timestamp,
87 updated -> Nullable<Timestamp>,
93 distinguished -> Bool,
99 comment_aggregates (id) {
105 published -> Timestamp,
118 published -> Timestamp,
125 recipient_id -> Int4,
128 published -> Timestamp,
133 comment_report (id) {
137 original_comment_text -> Text,
140 resolver_id -> Nullable<Int4>,
141 published -> Timestamp,
142 updated -> Nullable<Timestamp>,
151 published -> Timestamp,
162 description -> Nullable<Text>,
164 published -> Timestamp,
165 updated -> Nullable<Timestamp>,
171 private_key -> Nullable<Text>,
173 last_refreshed_at -> Timestamp,
174 icon -> Nullable<Text>,
175 banner -> Nullable<Text>,
177 followers_url -> Varchar,
179 inbox_url -> Varchar,
181 shared_inbox_url -> Nullable<Varchar>,
183 posting_restricted_to_mods -> Bool,
186 moderators_url -> Nullable<Varchar>,
188 featured_url -> Nullable<Varchar>,
193 community_aggregates (id) {
195 community_id -> Int4,
199 published -> Timestamp,
200 users_active_day -> Int8,
201 users_active_week -> Int8,
202 users_active_month -> Int8,
203 users_active_half_year -> Int8,
209 community_block (id) {
212 community_id -> Int4,
213 published -> Timestamp,
218 community_follower (id) {
220 community_id -> Int4,
222 published -> Timestamp,
228 community_language (id) {
230 community_id -> Int4,
236 community_moderator (id) {
238 community_id -> Int4,
240 published -> Timestamp,
245 community_person_ban (id) {
247 community_id -> Int4,
249 published -> Timestamp,
250 expires -> Nullable<Timestamp>,
257 local_site_id -> Int4,
259 shortcode -> Varchar,
263 published -> Timestamp,
264 updated -> Nullable<Timestamp>,
269 custom_emoji_keyword (id) {
271 custom_emoji_id -> Int4,
278 email_verification (id) {
280 local_user_id -> Int4,
282 verification_token -> Text,
283 published -> Timestamp,
288 federation_allowlist (id) {
291 published -> Timestamp,
292 updated -> Nullable<Timestamp>,
297 federation_blocklist (id) {
300 published -> Timestamp,
301 updated -> Nullable<Timestamp>,
310 published -> Timestamp,
311 updated -> Nullable<Timestamp>,
313 software -> Nullable<Varchar>,
315 version -> Nullable<Varchar>,
329 use diesel::sql_types::*;
330 use super::sql_types::ListingTypeEnum;
331 use super::sql_types::RegistrationModeEnum;
337 enable_downvotes -> Bool,
339 community_creation_admin_only -> Bool,
340 require_email_verification -> Bool,
341 application_question -> Nullable<Text>,
342 private_instance -> Bool,
343 default_theme -> Text,
344 default_post_listing_type -> ListingTypeEnum,
345 legal_information -> Nullable<Text>,
346 hide_modlog_mod_names -> Bool,
347 application_email_admins -> Bool,
348 slur_filter_regex -> Nullable<Text>,
349 actor_name_max_length -> Int4,
350 federation_enabled -> Bool,
351 captcha_enabled -> Bool,
353 captcha_difficulty -> Varchar,
354 published -> Timestamp,
355 updated -> Nullable<Timestamp>,
356 registration_mode -> RegistrationModeEnum,
357 reports_email_admins -> Bool,
362 local_site_rate_limit (id) {
364 local_site_id -> Int4,
366 message_per_second -> Int4,
368 post_per_second -> Int4,
370 register_per_second -> Int4,
372 image_per_second -> Int4,
374 comment_per_second -> Int4,
376 search_per_second -> Int4,
377 published -> Timestamp,
378 updated -> Nullable<Timestamp>,
383 use diesel::sql_types::*;
384 use super::sql_types::SortTypeEnum;
385 use super::sql_types::ListingTypeEnum;
390 password_encrypted -> Text,
391 email -> Nullable<Text>,
394 default_sort_type -> SortTypeEnum,
395 default_listing_type -> ListingTypeEnum,
397 interface_language -> Varchar,
398 show_avatars -> Bool,
399 send_notifications_to_email -> Bool,
400 validator_time -> Timestamp,
402 show_bot_accounts -> Bool,
403 show_read_posts -> Bool,
404 show_new_post_notifs -> Bool,
405 email_verified -> Bool,
406 accepted_application -> Bool,
407 totp_2fa_secret -> Nullable<Text>,
408 totp_2fa_url -> Nullable<Text>,
413 local_user_language (id) {
415 local_user_id -> Int4,
423 mod_person_id -> Int4,
424 other_person_id -> Int4,
431 mod_add_community (id) {
433 mod_person_id -> Int4,
434 other_person_id -> Int4,
435 community_id -> Int4,
444 mod_person_id -> Int4,
445 other_person_id -> Int4,
446 reason -> Nullable<Text>,
448 expires -> Nullable<Timestamp>,
454 mod_ban_from_community (id) {
456 mod_person_id -> Int4,
457 other_person_id -> Int4,
458 community_id -> Int4,
459 reason -> Nullable<Text>,
461 expires -> Nullable<Timestamp>,
467 mod_feature_post (id) {
469 mod_person_id -> Int4,
473 is_featured_community -> Bool,
478 mod_hide_community (id) {
480 community_id -> Int4,
481 mod_person_id -> Int4,
483 reason -> Nullable<Text>,
491 mod_person_id -> Int4,
499 mod_remove_comment (id) {
501 mod_person_id -> Int4,
503 reason -> Nullable<Text>,
510 mod_remove_community (id) {
512 mod_person_id -> Int4,
513 community_id -> Int4,
514 reason -> Nullable<Text>,
516 expires -> Nullable<Timestamp>,
522 mod_remove_post (id) {
524 mod_person_id -> Int4,
526 reason -> Nullable<Text>,
533 mod_transfer_community (id) {
535 mod_person_id -> Int4,
536 other_person_id -> Int4,
537 community_id -> Int4,
543 password_reset_request (id) {
545 token_encrypted -> Text,
546 published -> Timestamp,
547 local_user_id -> Int4,
557 display_name -> Nullable<Varchar>,
558 avatar -> Nullable<Text>,
560 published -> Timestamp,
561 updated -> Nullable<Timestamp>,
564 bio -> Nullable<Text>,
566 private_key -> Nullable<Text>,
568 last_refreshed_at -> Timestamp,
569 banner -> Nullable<Text>,
572 inbox_url -> Varchar,
574 shared_inbox_url -> Nullable<Varchar>,
575 matrix_user_id -> Nullable<Text>,
578 ban_expires -> Nullable<Timestamp>,
584 person_aggregates (id) {
589 comment_count -> Int8,
590 comment_score -> Int8,
598 published -> Timestamp,
607 published -> Timestamp,
612 person_follower (id) {
616 published -> Timestamp,
622 person_mention (id) {
624 recipient_id -> Int4,
627 published -> Timestamp,
632 person_post_aggregates (id) {
636 read_comments -> Int8,
637 published -> Timestamp,
647 url -> Nullable<Varchar>,
648 body -> Nullable<Text>,
650 community_id -> Int4,
653 published -> Timestamp,
654 updated -> Nullable<Timestamp>,
657 embed_title -> Nullable<Text>,
658 embed_description -> Nullable<Text>,
659 thumbnail_url -> Nullable<Text>,
663 embed_video_url -> Nullable<Text>,
665 featured_community -> Bool,
666 featured_local -> Bool,
671 post_aggregates (id) {
678 published -> Timestamp,
679 newest_comment_time_necro -> Timestamp,
680 newest_comment_time -> Timestamp,
681 featured_community -> Bool,
682 featured_local -> Bool,
684 hot_rank_active -> Int4,
694 published -> Timestamp,
703 published -> Timestamp,
713 original_post_name -> Varchar,
714 original_post_url -> Nullable<Text>,
715 original_post_body -> Nullable<Text>,
718 resolver_id -> Nullable<Int4>,
719 published -> Timestamp,
720 updated -> Nullable<Timestamp>,
729 published -> Timestamp,
734 private_message (id) {
737 recipient_id -> Int4,
741 published -> Timestamp,
742 updated -> Nullable<Timestamp>,
750 private_message_report (id) {
753 private_message_id -> Int4,
754 original_pm_text -> Text,
757 resolver_id -> Nullable<Int4>,
758 published -> Timestamp,
759 updated -> Nullable<Timestamp>,
764 registration_application (id) {
766 local_user_id -> Int4,
768 admin_id -> Nullable<Int4>,
769 deny_reason -> Nullable<Text>,
770 published -> Timestamp,
777 jwt_secret -> Varchar,
786 sidebar -> Nullable<Text>,
787 published -> Timestamp,
788 updated -> Nullable<Timestamp>,
789 icon -> Nullable<Text>,
790 banner -> Nullable<Text>,
792 description -> Nullable<Varchar>,
795 last_refreshed_at -> Timestamp,
797 inbox_url -> Varchar,
798 private_key -> Nullable<Text>,
805 site_aggregates (id) {
812 users_active_day -> Int8,
813 users_active_week -> Int8,
814 users_active_month -> Int8,
815 users_active_half_year -> Int8,
830 local_site_id -> Int4,
832 published -> Timestamp,
833 updated -> Nullable<Timestamp>,
837 diesel::joinable!(admin_purge_comment -> person (admin_person_id));
838 diesel::joinable!(admin_purge_comment -> post (post_id));
839 diesel::joinable!(admin_purge_community -> person (admin_person_id));
840 diesel::joinable!(admin_purge_person -> person (admin_person_id));
841 diesel::joinable!(admin_purge_post -> community (community_id));
842 diesel::joinable!(admin_purge_post -> person (admin_person_id));
843 diesel::joinable!(comment -> language (language_id));
844 diesel::joinable!(comment -> person (creator_id));
845 diesel::joinable!(comment -> post (post_id));
846 diesel::joinable!(comment_aggregates -> comment (comment_id));
847 diesel::joinable!(comment_like -> comment (comment_id));
848 diesel::joinable!(comment_like -> person (person_id));
849 diesel::joinable!(comment_like -> post (post_id));
850 diesel::joinable!(comment_reply -> comment (comment_id));
851 diesel::joinable!(comment_reply -> person (recipient_id));
852 diesel::joinable!(comment_report -> comment (comment_id));
853 diesel::joinable!(comment_saved -> comment (comment_id));
854 diesel::joinable!(comment_saved -> person (person_id));
855 diesel::joinable!(community -> instance (instance_id));
856 diesel::joinable!(community_aggregates -> community (community_id));
857 diesel::joinable!(community_block -> community (community_id));
858 diesel::joinable!(community_block -> person (person_id));
859 diesel::joinable!(community_follower -> community (community_id));
860 diesel::joinable!(community_follower -> person (person_id));
861 diesel::joinable!(community_language -> community (community_id));
862 diesel::joinable!(community_language -> language (language_id));
863 diesel::joinable!(community_moderator -> community (community_id));
864 diesel::joinable!(community_moderator -> person (person_id));
865 diesel::joinable!(community_person_ban -> community (community_id));
866 diesel::joinable!(community_person_ban -> person (person_id));
867 diesel::joinable!(custom_emoji -> local_site (local_site_id));
868 diesel::joinable!(custom_emoji_keyword -> custom_emoji (custom_emoji_id));
869 diesel::joinable!(email_verification -> local_user (local_user_id));
870 diesel::joinable!(federation_allowlist -> instance (instance_id));
871 diesel::joinable!(federation_blocklist -> instance (instance_id));
872 diesel::joinable!(local_site -> site (site_id));
873 diesel::joinable!(local_site_rate_limit -> local_site (local_site_id));
874 diesel::joinable!(local_user -> person (person_id));
875 diesel::joinable!(local_user_language -> language (language_id));
876 diesel::joinable!(local_user_language -> local_user (local_user_id));
877 diesel::joinable!(mod_add_community -> community (community_id));
878 diesel::joinable!(mod_ban_from_community -> community (community_id));
879 diesel::joinable!(mod_feature_post -> person (mod_person_id));
880 diesel::joinable!(mod_feature_post -> post (post_id));
881 diesel::joinable!(mod_hide_community -> community (community_id));
882 diesel::joinable!(mod_hide_community -> person (mod_person_id));
883 diesel::joinable!(mod_lock_post -> person (mod_person_id));
884 diesel::joinable!(mod_lock_post -> post (post_id));
885 diesel::joinable!(mod_remove_comment -> comment (comment_id));
886 diesel::joinable!(mod_remove_comment -> person (mod_person_id));
887 diesel::joinable!(mod_remove_community -> community (community_id));
888 diesel::joinable!(mod_remove_community -> person (mod_person_id));
889 diesel::joinable!(mod_remove_post -> person (mod_person_id));
890 diesel::joinable!(mod_remove_post -> post (post_id));
891 diesel::joinable!(mod_transfer_community -> community (community_id));
892 diesel::joinable!(password_reset_request -> local_user (local_user_id));
893 diesel::joinable!(person -> instance (instance_id));
894 diesel::joinable!(person_aggregates -> person (person_id));
895 diesel::joinable!(person_ban -> person (person_id));
896 diesel::joinable!(person_mention -> comment (comment_id));
897 diesel::joinable!(person_mention -> person (recipient_id));
898 diesel::joinable!(person_post_aggregates -> person (person_id));
899 diesel::joinable!(person_post_aggregates -> post (post_id));
900 diesel::joinable!(post -> community (community_id));
901 diesel::joinable!(post -> language (language_id));
902 diesel::joinable!(post -> person (creator_id));
903 diesel::joinable!(post_aggregates -> post (post_id));
904 diesel::joinable!(post_like -> person (person_id));
905 diesel::joinable!(post_like -> post (post_id));
906 diesel::joinable!(post_read -> person (person_id));
907 diesel::joinable!(post_read -> post (post_id));
908 diesel::joinable!(post_report -> post (post_id));
909 diesel::joinable!(post_saved -> person (person_id));
910 diesel::joinable!(post_saved -> post (post_id));
911 diesel::joinable!(private_message_report -> private_message (private_message_id));
912 diesel::joinable!(registration_application -> local_user (local_user_id));
913 diesel::joinable!(registration_application -> person (admin_id));
914 diesel::joinable!(site -> instance (instance_id));
915 diesel::joinable!(site_aggregates -> site (site_id));
916 diesel::joinable!(site_language -> language (language_id));
917 diesel::joinable!(site_language -> site (site_id));
918 diesel::joinable!(tagline -> local_site (local_site_id));
920 diesel::allow_tables_to_appear_in_same_query!(
923 admin_purge_community,
934 community_aggregates,
939 community_person_ban,
941 custom_emoji_keyword,
943 federation_allowlist,
944 federation_blocklist,
948 local_site_rate_limit,
954 mod_ban_from_community,
959 mod_remove_community,
961 mod_transfer_community,
962 password_reset_request,
969 person_post_aggregates,
977 private_message_report,
978 registration_application,