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;
18 admin_purge_comment (id) {
20 admin_person_id -> Int4,
22 reason -> Nullable<Text>,
28 admin_purge_community (id) {
30 admin_person_id -> Int4,
31 reason -> Nullable<Text>,
37 admin_purge_person (id) {
39 admin_person_id -> Int4,
40 reason -> Nullable<Text>,
46 admin_purge_post (id) {
48 admin_person_id -> Int4,
50 reason -> Nullable<Text>,
60 published -> Timestamp,
65 use diesel::sql_types::*;
66 use diesel_ltree::sql_types::Ltree;
74 published -> Timestamp,
75 updated -> Nullable<Timestamp>,
81 distinguished -> Bool,
87 comment_aggregates (id) {
93 published -> Timestamp,
106 published -> Timestamp,
113 recipient_id -> Int4,
116 published -> Timestamp,
121 comment_report (id) {
125 original_comment_text -> Text,
128 resolver_id -> Nullable<Int4>,
129 published -> Timestamp,
130 updated -> Nullable<Timestamp>,
139 published -> Timestamp,
150 description -> Nullable<Text>,
152 published -> Timestamp,
153 updated -> Nullable<Timestamp>,
159 private_key -> Nullable<Text>,
161 last_refreshed_at -> Timestamp,
162 icon -> Nullable<Text>,
163 banner -> Nullable<Text>,
165 followers_url -> Varchar,
167 inbox_url -> Varchar,
169 shared_inbox_url -> Nullable<Varchar>,
171 posting_restricted_to_mods -> Bool,
174 moderators_url -> Nullable<Varchar>,
176 featured_url -> Nullable<Varchar>,
181 community_aggregates (id) {
183 community_id -> Int4,
187 published -> Timestamp,
188 users_active_day -> Int8,
189 users_active_week -> Int8,
190 users_active_month -> Int8,
191 users_active_half_year -> Int8,
197 community_block (id) {
200 community_id -> Int4,
201 published -> Timestamp,
206 community_follower (id) {
208 community_id -> Int4,
210 published -> Timestamp,
216 community_language (id) {
218 community_id -> Int4,
224 community_moderator (id) {
226 community_id -> Int4,
228 published -> Timestamp,
233 community_person_ban (id) {
235 community_id -> Int4,
237 published -> Timestamp,
238 expires -> Nullable<Timestamp>,
245 local_site_id -> Int4,
247 shortcode -> Varchar,
251 published -> Timestamp,
252 updated -> Nullable<Timestamp>,
257 custom_emoji_keyword (id) {
259 custom_emoji_id -> Int4,
266 email_verification (id) {
268 local_user_id -> Int4,
270 verification_token -> Text,
271 published -> Timestamp,
276 federation_allowlist (id) {
279 published -> Timestamp,
280 updated -> Nullable<Timestamp>,
285 federation_blocklist (id) {
288 published -> Timestamp,
289 updated -> Nullable<Timestamp>,
298 published -> Timestamp,
299 updated -> Nullable<Timestamp>,
301 software -> Nullable<Varchar>,
303 version -> Nullable<Varchar>,
317 use diesel::sql_types::*;
318 use super::sql_types::ListingTypeEnum;
319 use super::sql_types::RegistrationModeEnum;
325 enable_downvotes -> Bool,
327 community_creation_admin_only -> Bool,
328 require_email_verification -> Bool,
329 application_question -> Nullable<Text>,
330 private_instance -> Bool,
331 default_theme -> Text,
332 default_post_listing_type -> ListingTypeEnum,
333 legal_information -> Nullable<Text>,
334 hide_modlog_mod_names -> Bool,
335 application_email_admins -> Bool,
336 slur_filter_regex -> Nullable<Text>,
337 actor_name_max_length -> Int4,
338 federation_enabled -> Bool,
339 captcha_enabled -> Bool,
341 captcha_difficulty -> Varchar,
342 published -> Timestamp,
343 updated -> Nullable<Timestamp>,
344 registration_mode -> RegistrationModeEnum,
345 reports_email_admins -> Bool,
350 local_site_rate_limit (id) {
352 local_site_id -> Int4,
354 message_per_second -> Int4,
356 post_per_second -> Int4,
358 register_per_second -> Int4,
360 image_per_second -> Int4,
362 comment_per_second -> Int4,
364 search_per_second -> Int4,
365 published -> Timestamp,
366 updated -> Nullable<Timestamp>,
371 use diesel::sql_types::*;
372 use super::sql_types::SortTypeEnum;
373 use super::sql_types::ListingTypeEnum;
378 password_encrypted -> Text,
379 email -> Nullable<Text>,
382 default_sort_type -> SortTypeEnum,
383 default_listing_type -> ListingTypeEnum,
385 interface_language -> Varchar,
386 show_avatars -> Bool,
387 send_notifications_to_email -> Bool,
388 validator_time -> Timestamp,
390 show_bot_accounts -> Bool,
391 show_read_posts -> Bool,
392 show_new_post_notifs -> Bool,
393 email_verified -> Bool,
394 accepted_application -> Bool,
395 totp_2fa_secret -> Nullable<Text>,
396 totp_2fa_url -> Nullable<Text>,
397 open_links_in_new_tab -> Bool,
398 infinite_scroll_enabled -> Bool,
403 local_user_language (id) {
405 local_user_id -> Int4,
413 mod_person_id -> Int4,
414 other_person_id -> Int4,
421 mod_add_community (id) {
423 mod_person_id -> Int4,
424 other_person_id -> Int4,
425 community_id -> Int4,
434 mod_person_id -> Int4,
435 other_person_id -> Int4,
436 reason -> Nullable<Text>,
438 expires -> Nullable<Timestamp>,
444 mod_ban_from_community (id) {
446 mod_person_id -> Int4,
447 other_person_id -> Int4,
448 community_id -> Int4,
449 reason -> Nullable<Text>,
451 expires -> Nullable<Timestamp>,
457 mod_feature_post (id) {
459 mod_person_id -> Int4,
463 is_featured_community -> Bool,
468 mod_hide_community (id) {
470 community_id -> Int4,
471 mod_person_id -> Int4,
473 reason -> Nullable<Text>,
481 mod_person_id -> Int4,
489 mod_remove_comment (id) {
491 mod_person_id -> Int4,
493 reason -> Nullable<Text>,
500 mod_remove_community (id) {
502 mod_person_id -> Int4,
503 community_id -> Int4,
504 reason -> Nullable<Text>,
506 expires -> Nullable<Timestamp>,
512 mod_remove_post (id) {
514 mod_person_id -> Int4,
516 reason -> Nullable<Text>,
523 mod_transfer_community (id) {
525 mod_person_id -> Int4,
526 other_person_id -> Int4,
527 community_id -> Int4,
533 password_reset_request (id) {
535 token_encrypted -> Text,
536 published -> Timestamp,
537 local_user_id -> Int4,
547 display_name -> Nullable<Varchar>,
548 avatar -> Nullable<Text>,
550 published -> Timestamp,
551 updated -> Nullable<Timestamp>,
554 bio -> Nullable<Text>,
556 private_key -> Nullable<Text>,
558 last_refreshed_at -> Timestamp,
559 banner -> Nullable<Text>,
562 inbox_url -> Varchar,
564 shared_inbox_url -> Nullable<Varchar>,
565 matrix_user_id -> Nullable<Text>,
568 ban_expires -> Nullable<Timestamp>,
574 person_aggregates (id) {
579 comment_count -> Int8,
580 comment_score -> Int8,
588 published -> Timestamp,
597 published -> Timestamp,
602 person_follower (id) {
606 published -> Timestamp,
612 person_mention (id) {
614 recipient_id -> Int4,
617 published -> Timestamp,
622 person_post_aggregates (id) {
626 read_comments -> Int8,
627 published -> Timestamp,
637 url -> Nullable<Varchar>,
638 body -> Nullable<Text>,
640 community_id -> Int4,
643 published -> Timestamp,
644 updated -> Nullable<Timestamp>,
647 embed_title -> Nullable<Text>,
648 embed_description -> Nullable<Text>,
649 thumbnail_url -> Nullable<Text>,
653 embed_video_url -> Nullable<Text>,
655 featured_community -> Bool,
656 featured_local -> Bool,
661 post_aggregates (id) {
668 published -> Timestamp,
669 newest_comment_time_necro -> Timestamp,
670 newest_comment_time -> Timestamp,
671 featured_community -> Bool,
672 featured_local -> Bool,
674 hot_rank_active -> Int4,
684 published -> Timestamp,
693 published -> Timestamp,
703 original_post_name -> Varchar,
704 original_post_url -> Nullable<Text>,
705 original_post_body -> Nullable<Text>,
708 resolver_id -> Nullable<Int4>,
709 published -> Timestamp,
710 updated -> Nullable<Timestamp>,
719 published -> Timestamp,
724 private_message (id) {
727 recipient_id -> Int4,
731 published -> Timestamp,
732 updated -> Nullable<Timestamp>,
740 private_message_report (id) {
743 private_message_id -> Int4,
744 original_pm_text -> Text,
747 resolver_id -> Nullable<Int4>,
748 published -> Timestamp,
749 updated -> Nullable<Timestamp>,
754 received_activity (id) {
757 published -> Timestamp,
762 registration_application (id) {
764 local_user_id -> Int4,
766 admin_id -> Nullable<Int4>,
767 deny_reason -> Nullable<Text>,
768 published -> Timestamp,
775 jwt_secret -> Varchar,
785 published -> Timestamp,
794 sidebar -> Nullable<Text>,
795 published -> Timestamp,
796 updated -> Nullable<Timestamp>,
797 icon -> Nullable<Text>,
798 banner -> Nullable<Text>,
800 description -> Nullable<Varchar>,
803 last_refreshed_at -> Timestamp,
805 inbox_url -> Varchar,
806 private_key -> Nullable<Text>,
813 site_aggregates (id) {
820 users_active_day -> Int8,
821 users_active_week -> Int8,
822 users_active_month -> Int8,
823 users_active_half_year -> Int8,
838 local_site_id -> Int4,
840 published -> Timestamp,
841 updated -> Nullable<Timestamp>,
845 diesel::joinable!(admin_purge_comment -> person (admin_person_id));
846 diesel::joinable!(admin_purge_comment -> post (post_id));
847 diesel::joinable!(admin_purge_community -> person (admin_person_id));
848 diesel::joinable!(admin_purge_person -> person (admin_person_id));
849 diesel::joinable!(admin_purge_post -> community (community_id));
850 diesel::joinable!(admin_purge_post -> person (admin_person_id));
851 diesel::joinable!(comment -> language (language_id));
852 diesel::joinable!(comment -> person (creator_id));
853 diesel::joinable!(comment -> post (post_id));
854 diesel::joinable!(comment_aggregates -> comment (comment_id));
855 diesel::joinable!(comment_like -> comment (comment_id));
856 diesel::joinable!(comment_like -> person (person_id));
857 diesel::joinable!(comment_like -> post (post_id));
858 diesel::joinable!(comment_reply -> comment (comment_id));
859 diesel::joinable!(comment_reply -> person (recipient_id));
860 diesel::joinable!(comment_report -> comment (comment_id));
861 diesel::joinable!(comment_saved -> comment (comment_id));
862 diesel::joinable!(comment_saved -> person (person_id));
863 diesel::joinable!(community -> instance (instance_id));
864 diesel::joinable!(community_aggregates -> community (community_id));
865 diesel::joinable!(community_block -> community (community_id));
866 diesel::joinable!(community_block -> person (person_id));
867 diesel::joinable!(community_follower -> community (community_id));
868 diesel::joinable!(community_follower -> person (person_id));
869 diesel::joinable!(community_language -> community (community_id));
870 diesel::joinable!(community_language -> language (language_id));
871 diesel::joinable!(community_moderator -> community (community_id));
872 diesel::joinable!(community_moderator -> person (person_id));
873 diesel::joinable!(community_person_ban -> community (community_id));
874 diesel::joinable!(community_person_ban -> person (person_id));
875 diesel::joinable!(custom_emoji -> local_site (local_site_id));
876 diesel::joinable!(custom_emoji_keyword -> custom_emoji (custom_emoji_id));
877 diesel::joinable!(email_verification -> local_user (local_user_id));
878 diesel::joinable!(federation_allowlist -> instance (instance_id));
879 diesel::joinable!(federation_blocklist -> instance (instance_id));
880 diesel::joinable!(local_site -> site (site_id));
881 diesel::joinable!(local_site_rate_limit -> local_site (local_site_id));
882 diesel::joinable!(local_user -> person (person_id));
883 diesel::joinable!(local_user_language -> language (language_id));
884 diesel::joinable!(local_user_language -> local_user (local_user_id));
885 diesel::joinable!(mod_add_community -> community (community_id));
886 diesel::joinable!(mod_ban_from_community -> community (community_id));
887 diesel::joinable!(mod_feature_post -> person (mod_person_id));
888 diesel::joinable!(mod_feature_post -> post (post_id));
889 diesel::joinable!(mod_hide_community -> community (community_id));
890 diesel::joinable!(mod_hide_community -> person (mod_person_id));
891 diesel::joinable!(mod_lock_post -> person (mod_person_id));
892 diesel::joinable!(mod_lock_post -> post (post_id));
893 diesel::joinable!(mod_remove_comment -> comment (comment_id));
894 diesel::joinable!(mod_remove_comment -> person (mod_person_id));
895 diesel::joinable!(mod_remove_community -> community (community_id));
896 diesel::joinable!(mod_remove_community -> person (mod_person_id));
897 diesel::joinable!(mod_remove_post -> person (mod_person_id));
898 diesel::joinable!(mod_remove_post -> post (post_id));
899 diesel::joinable!(mod_transfer_community -> community (community_id));
900 diesel::joinable!(password_reset_request -> local_user (local_user_id));
901 diesel::joinable!(person -> instance (instance_id));
902 diesel::joinable!(person_aggregates -> person (person_id));
903 diesel::joinable!(person_ban -> person (person_id));
904 diesel::joinable!(person_mention -> comment (comment_id));
905 diesel::joinable!(person_mention -> person (recipient_id));
906 diesel::joinable!(person_post_aggregates -> person (person_id));
907 diesel::joinable!(person_post_aggregates -> post (post_id));
908 diesel::joinable!(post -> community (community_id));
909 diesel::joinable!(post -> language (language_id));
910 diesel::joinable!(post -> person (creator_id));
911 diesel::joinable!(post_aggregates -> post (post_id));
912 diesel::joinable!(post_like -> person (person_id));
913 diesel::joinable!(post_like -> post (post_id));
914 diesel::joinable!(post_read -> person (person_id));
915 diesel::joinable!(post_read -> post (post_id));
916 diesel::joinable!(post_report -> post (post_id));
917 diesel::joinable!(post_saved -> person (person_id));
918 diesel::joinable!(post_saved -> post (post_id));
919 diesel::joinable!(private_message_report -> private_message (private_message_id));
920 diesel::joinable!(registration_application -> local_user (local_user_id));
921 diesel::joinable!(registration_application -> person (admin_id));
922 diesel::joinable!(site -> instance (instance_id));
923 diesel::joinable!(site_aggregates -> site (site_id));
924 diesel::joinable!(site_language -> language (language_id));
925 diesel::joinable!(site_language -> site (site_id));
926 diesel::joinable!(tagline -> local_site (local_site_id));
928 diesel::allow_tables_to_appear_in_same_query!(
930 admin_purge_community,
941 community_aggregates,
946 community_person_ban,
948 custom_emoji_keyword,
950 federation_allowlist,
951 federation_blocklist,
955 local_site_rate_limit,
961 mod_ban_from_community,
966 mod_remove_community,
968 mod_transfer_community,
969 password_reset_request,
976 person_post_aggregates,
984 private_message_report,
986 registration_application,