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,
96 controversy_rank -> Float8,
107 published -> Timestamp,
114 recipient_id -> Int4,
117 published -> Timestamp,
122 comment_report (id) {
126 original_comment_text -> Text,
129 resolver_id -> Nullable<Int4>,
130 published -> Timestamp,
131 updated -> Nullable<Timestamp>,
140 published -> Timestamp,
151 description -> Nullable<Text>,
153 published -> Timestamp,
154 updated -> Nullable<Timestamp>,
160 private_key -> Nullable<Text>,
162 last_refreshed_at -> Timestamp,
163 icon -> Nullable<Text>,
164 banner -> Nullable<Text>,
166 followers_url -> Varchar,
168 inbox_url -> Varchar,
170 shared_inbox_url -> Nullable<Varchar>,
172 posting_restricted_to_mods -> Bool,
175 moderators_url -> Nullable<Varchar>,
177 featured_url -> Nullable<Varchar>,
182 community_aggregates (id) {
184 community_id -> Int4,
188 published -> Timestamp,
189 users_active_day -> Int8,
190 users_active_week -> Int8,
191 users_active_month -> Int8,
192 users_active_half_year -> Int8,
198 community_block (id) {
201 community_id -> Int4,
202 published -> Timestamp,
207 community_follower (id) {
209 community_id -> Int4,
211 published -> Timestamp,
217 community_language (id) {
219 community_id -> Int4,
225 community_moderator (id) {
227 community_id -> Int4,
229 published -> Timestamp,
234 community_person_ban (id) {
236 community_id -> Int4,
238 published -> Timestamp,
239 expires -> Nullable<Timestamp>,
246 local_site_id -> Int4,
248 shortcode -> Varchar,
252 published -> Timestamp,
253 updated -> Nullable<Timestamp>,
258 custom_emoji_keyword (id) {
260 custom_emoji_id -> Int4,
267 email_verification (id) {
269 local_user_id -> Int4,
271 verification_token -> Text,
272 published -> Timestamp,
277 federation_allowlist (id) {
280 published -> Timestamp,
281 updated -> Nullable<Timestamp>,
286 federation_blocklist (id) {
289 published -> Timestamp,
290 updated -> Nullable<Timestamp>,
299 published -> Timestamp,
300 updated -> Nullable<Timestamp>,
302 software -> Nullable<Varchar>,
304 version -> Nullable<Varchar>,
318 use diesel::sql_types::*;
319 use super::sql_types::ListingTypeEnum;
320 use super::sql_types::RegistrationModeEnum;
326 enable_downvotes -> Bool,
328 community_creation_admin_only -> Bool,
329 require_email_verification -> Bool,
330 application_question -> Nullable<Text>,
331 private_instance -> Bool,
332 default_theme -> Text,
333 default_post_listing_type -> ListingTypeEnum,
334 legal_information -> Nullable<Text>,
335 hide_modlog_mod_names -> Bool,
336 application_email_admins -> Bool,
337 slur_filter_regex -> Nullable<Text>,
338 actor_name_max_length -> Int4,
339 federation_enabled -> Bool,
340 captcha_enabled -> Bool,
342 captcha_difficulty -> Varchar,
343 published -> Timestamp,
344 updated -> Nullable<Timestamp>,
345 registration_mode -> RegistrationModeEnum,
346 reports_email_admins -> Bool,
351 local_site_rate_limit (id) {
353 local_site_id -> Int4,
355 message_per_second -> Int4,
357 post_per_second -> Int4,
359 register_per_second -> Int4,
361 image_per_second -> Int4,
363 comment_per_second -> Int4,
365 search_per_second -> Int4,
366 published -> Timestamp,
367 updated -> Nullable<Timestamp>,
372 use diesel::sql_types::*;
373 use super::sql_types::SortTypeEnum;
374 use super::sql_types::ListingTypeEnum;
379 password_encrypted -> Text,
380 email -> Nullable<Text>,
383 default_sort_type -> SortTypeEnum,
384 default_listing_type -> ListingTypeEnum,
386 interface_language -> Varchar,
387 show_avatars -> Bool,
388 send_notifications_to_email -> Bool,
389 validator_time -> Timestamp,
391 show_bot_accounts -> Bool,
392 show_read_posts -> Bool,
393 show_new_post_notifs -> Bool,
394 email_verified -> Bool,
395 accepted_application -> Bool,
396 totp_2fa_secret -> Nullable<Text>,
397 totp_2fa_url -> Nullable<Text>,
398 open_links_in_new_tab -> Bool,
401 infinite_scroll_enabled -> Bool,
406 local_user_language (id) {
408 local_user_id -> Int4,
416 mod_person_id -> Int4,
417 other_person_id -> Int4,
424 mod_add_community (id) {
426 mod_person_id -> Int4,
427 other_person_id -> Int4,
428 community_id -> Int4,
437 mod_person_id -> Int4,
438 other_person_id -> Int4,
439 reason -> Nullable<Text>,
441 expires -> Nullable<Timestamp>,
447 mod_ban_from_community (id) {
449 mod_person_id -> Int4,
450 other_person_id -> Int4,
451 community_id -> Int4,
452 reason -> Nullable<Text>,
454 expires -> Nullable<Timestamp>,
460 mod_feature_post (id) {
462 mod_person_id -> Int4,
466 is_featured_community -> Bool,
471 mod_hide_community (id) {
473 community_id -> Int4,
474 mod_person_id -> Int4,
476 reason -> Nullable<Text>,
484 mod_person_id -> Int4,
492 mod_remove_comment (id) {
494 mod_person_id -> Int4,
496 reason -> Nullable<Text>,
503 mod_remove_community (id) {
505 mod_person_id -> Int4,
506 community_id -> Int4,
507 reason -> Nullable<Text>,
509 expires -> Nullable<Timestamp>,
515 mod_remove_post (id) {
517 mod_person_id -> Int4,
519 reason -> Nullable<Text>,
526 mod_transfer_community (id) {
528 mod_person_id -> Int4,
529 other_person_id -> Int4,
530 community_id -> Int4,
536 password_reset_request (id) {
538 token_encrypted -> Text,
539 published -> Timestamp,
540 local_user_id -> Int4,
550 display_name -> Nullable<Varchar>,
551 avatar -> Nullable<Text>,
553 published -> Timestamp,
554 updated -> Nullable<Timestamp>,
557 bio -> Nullable<Text>,
559 private_key -> Nullable<Text>,
561 last_refreshed_at -> Timestamp,
562 banner -> Nullable<Text>,
565 inbox_url -> Varchar,
567 shared_inbox_url -> Nullable<Varchar>,
568 matrix_user_id -> Nullable<Text>,
571 ban_expires -> Nullable<Timestamp>,
577 person_aggregates (id) {
582 comment_count -> Int8,
583 comment_score -> Int8,
591 published -> Timestamp,
600 published -> Timestamp,
605 person_follower (id) {
609 published -> Timestamp,
615 person_mention (id) {
617 recipient_id -> Int4,
620 published -> Timestamp,
625 person_post_aggregates (id) {
629 read_comments -> Int8,
630 published -> Timestamp,
640 url -> Nullable<Varchar>,
641 body -> Nullable<Text>,
643 community_id -> Int4,
646 published -> Timestamp,
647 updated -> Nullable<Timestamp>,
650 embed_title -> Nullable<Text>,
651 embed_description -> Nullable<Text>,
652 thumbnail_url -> Nullable<Text>,
656 embed_video_url -> Nullable<Text>,
658 featured_community -> Bool,
659 featured_local -> Bool,
664 post_aggregates (id) {
671 published -> Timestamp,
672 newest_comment_time_necro -> Timestamp,
673 newest_comment_time -> Timestamp,
674 featured_community -> Bool,
675 featured_local -> Bool,
677 hot_rank_active -> Int4,
678 community_id -> Int4,
680 controversy_rank -> Float8,
690 published -> Timestamp,
699 published -> Timestamp,
709 original_post_name -> Varchar,
710 original_post_url -> Nullable<Text>,
711 original_post_body -> Nullable<Text>,
714 resolver_id -> Nullable<Int4>,
715 published -> Timestamp,
716 updated -> Nullable<Timestamp>,
725 published -> Timestamp,
730 private_message (id) {
733 recipient_id -> Int4,
737 published -> Timestamp,
738 updated -> Nullable<Timestamp>,
746 private_message_report (id) {
749 private_message_id -> Int4,
750 original_pm_text -> Text,
753 resolver_id -> Nullable<Int4>,
754 published -> Timestamp,
755 updated -> Nullable<Timestamp>,
760 received_activity (id) {
763 published -> Timestamp,
768 registration_application (id) {
770 local_user_id -> Int4,
772 admin_id -> Nullable<Int4>,
773 deny_reason -> Nullable<Text>,
774 published -> Timestamp,
781 jwt_secret -> Varchar,
791 published -> Timestamp,
800 sidebar -> Nullable<Text>,
801 published -> Timestamp,
802 updated -> Nullable<Timestamp>,
803 icon -> Nullable<Text>,
804 banner -> Nullable<Text>,
806 description -> Nullable<Varchar>,
809 last_refreshed_at -> Timestamp,
811 inbox_url -> Varchar,
812 private_key -> Nullable<Text>,
819 site_aggregates (id) {
826 users_active_day -> Int8,
827 users_active_week -> Int8,
828 users_active_month -> Int8,
829 users_active_half_year -> Int8,
844 local_site_id -> Int4,
846 published -> Timestamp,
847 updated -> Nullable<Timestamp>,
851 diesel::joinable!(admin_purge_comment -> person (admin_person_id));
852 diesel::joinable!(admin_purge_comment -> post (post_id));
853 diesel::joinable!(admin_purge_community -> person (admin_person_id));
854 diesel::joinable!(admin_purge_person -> person (admin_person_id));
855 diesel::joinable!(admin_purge_post -> community (community_id));
856 diesel::joinable!(admin_purge_post -> person (admin_person_id));
857 diesel::joinable!(comment -> language (language_id));
858 diesel::joinable!(comment -> person (creator_id));
859 diesel::joinable!(comment -> post (post_id));
860 diesel::joinable!(comment_aggregates -> comment (comment_id));
861 diesel::joinable!(comment_like -> comment (comment_id));
862 diesel::joinable!(comment_like -> person (person_id));
863 diesel::joinable!(comment_like -> post (post_id));
864 diesel::joinable!(comment_reply -> comment (comment_id));
865 diesel::joinable!(comment_reply -> person (recipient_id));
866 diesel::joinable!(comment_report -> comment (comment_id));
867 diesel::joinable!(comment_saved -> comment (comment_id));
868 diesel::joinable!(comment_saved -> person (person_id));
869 diesel::joinable!(community -> instance (instance_id));
870 diesel::joinable!(community_aggregates -> community (community_id));
871 diesel::joinable!(community_block -> community (community_id));
872 diesel::joinable!(community_block -> person (person_id));
873 diesel::joinable!(community_follower -> community (community_id));
874 diesel::joinable!(community_follower -> person (person_id));
875 diesel::joinable!(community_language -> community (community_id));
876 diesel::joinable!(community_language -> language (language_id));
877 diesel::joinable!(community_moderator -> community (community_id));
878 diesel::joinable!(community_moderator -> person (person_id));
879 diesel::joinable!(community_person_ban -> community (community_id));
880 diesel::joinable!(community_person_ban -> person (person_id));
881 diesel::joinable!(custom_emoji -> local_site (local_site_id));
882 diesel::joinable!(custom_emoji_keyword -> custom_emoji (custom_emoji_id));
883 diesel::joinable!(email_verification -> local_user (local_user_id));
884 diesel::joinable!(federation_allowlist -> instance (instance_id));
885 diesel::joinable!(federation_blocklist -> instance (instance_id));
886 diesel::joinable!(local_site -> site (site_id));
887 diesel::joinable!(local_site_rate_limit -> local_site (local_site_id));
888 diesel::joinable!(local_user -> person (person_id));
889 diesel::joinable!(local_user_language -> language (language_id));
890 diesel::joinable!(local_user_language -> local_user (local_user_id));
891 diesel::joinable!(mod_add_community -> community (community_id));
892 diesel::joinable!(mod_ban_from_community -> community (community_id));
893 diesel::joinable!(mod_feature_post -> person (mod_person_id));
894 diesel::joinable!(mod_feature_post -> post (post_id));
895 diesel::joinable!(mod_hide_community -> community (community_id));
896 diesel::joinable!(mod_hide_community -> person (mod_person_id));
897 diesel::joinable!(mod_lock_post -> person (mod_person_id));
898 diesel::joinable!(mod_lock_post -> post (post_id));
899 diesel::joinable!(mod_remove_comment -> comment (comment_id));
900 diesel::joinable!(mod_remove_comment -> person (mod_person_id));
901 diesel::joinable!(mod_remove_community -> community (community_id));
902 diesel::joinable!(mod_remove_community -> person (mod_person_id));
903 diesel::joinable!(mod_remove_post -> person (mod_person_id));
904 diesel::joinable!(mod_remove_post -> post (post_id));
905 diesel::joinable!(mod_transfer_community -> community (community_id));
906 diesel::joinable!(password_reset_request -> local_user (local_user_id));
907 diesel::joinable!(person -> instance (instance_id));
908 diesel::joinable!(person_aggregates -> person (person_id));
909 diesel::joinable!(person_ban -> person (person_id));
910 diesel::joinable!(person_mention -> comment (comment_id));
911 diesel::joinable!(person_mention -> person (recipient_id));
912 diesel::joinable!(person_post_aggregates -> person (person_id));
913 diesel::joinable!(person_post_aggregates -> post (post_id));
914 diesel::joinable!(post -> community (community_id));
915 diesel::joinable!(post -> language (language_id));
916 diesel::joinable!(post -> person (creator_id));
917 diesel::joinable!(post_aggregates -> community (community_id));
918 diesel::joinable!(post_aggregates -> person (creator_id));
919 diesel::joinable!(post_aggregates -> post (post_id));
920 diesel::joinable!(post_like -> person (person_id));
921 diesel::joinable!(post_like -> post (post_id));
922 diesel::joinable!(post_read -> person (person_id));
923 diesel::joinable!(post_read -> post (post_id));
924 diesel::joinable!(post_report -> post (post_id));
925 diesel::joinable!(post_saved -> person (person_id));
926 diesel::joinable!(post_saved -> post (post_id));
927 diesel::joinable!(private_message_report -> private_message (private_message_id));
928 diesel::joinable!(registration_application -> local_user (local_user_id));
929 diesel::joinable!(registration_application -> person (admin_id));
930 diesel::joinable!(site -> instance (instance_id));
931 diesel::joinable!(site_aggregates -> site (site_id));
932 diesel::joinable!(site_language -> language (language_id));
933 diesel::joinable!(site_language -> site (site_id));
934 diesel::joinable!(tagline -> local_site (local_site_id));
936 diesel::allow_tables_to_appear_in_same_query!(
938 admin_purge_community,
949 community_aggregates,
954 community_person_ban,
956 custom_emoji_keyword,
958 federation_allowlist,
959 federation_blocklist,
963 local_site_rate_limit,
969 mod_ban_from_community,
974 mod_remove_community,
976 mod_transfer_community,
977 password_reset_request,
984 person_post_aggregates,
992 private_message_report,
994 registration_application,