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>,
409 open_links_in_new_tab -> Bool,
410 infinite_scroll_enabled -> Bool,
415 local_user_language (id) {
417 local_user_id -> Int4,
425 mod_person_id -> Int4,
426 other_person_id -> Int4,
433 mod_add_community (id) {
435 mod_person_id -> Int4,
436 other_person_id -> Int4,
437 community_id -> Int4,
446 mod_person_id -> Int4,
447 other_person_id -> Int4,
448 reason -> Nullable<Text>,
450 expires -> Nullable<Timestamp>,
456 mod_ban_from_community (id) {
458 mod_person_id -> Int4,
459 other_person_id -> Int4,
460 community_id -> Int4,
461 reason -> Nullable<Text>,
463 expires -> Nullable<Timestamp>,
469 mod_feature_post (id) {
471 mod_person_id -> Int4,
475 is_featured_community -> Bool,
480 mod_hide_community (id) {
482 community_id -> Int4,
483 mod_person_id -> Int4,
485 reason -> Nullable<Text>,
493 mod_person_id -> Int4,
501 mod_remove_comment (id) {
503 mod_person_id -> Int4,
505 reason -> Nullable<Text>,
512 mod_remove_community (id) {
514 mod_person_id -> Int4,
515 community_id -> Int4,
516 reason -> Nullable<Text>,
518 expires -> Nullable<Timestamp>,
524 mod_remove_post (id) {
526 mod_person_id -> Int4,
528 reason -> Nullable<Text>,
535 mod_transfer_community (id) {
537 mod_person_id -> Int4,
538 other_person_id -> Int4,
539 community_id -> Int4,
545 password_reset_request (id) {
547 token_encrypted -> Text,
548 published -> Timestamp,
549 local_user_id -> Int4,
559 display_name -> Nullable<Varchar>,
560 avatar -> Nullable<Text>,
562 published -> Timestamp,
563 updated -> Nullable<Timestamp>,
566 bio -> Nullable<Text>,
568 private_key -> Nullable<Text>,
570 last_refreshed_at -> Timestamp,
571 banner -> Nullable<Text>,
574 inbox_url -> Varchar,
576 shared_inbox_url -> Nullable<Varchar>,
577 matrix_user_id -> Nullable<Text>,
580 ban_expires -> Nullable<Timestamp>,
586 person_aggregates (id) {
591 comment_count -> Int8,
592 comment_score -> Int8,
600 published -> Timestamp,
609 published -> Timestamp,
614 person_follower (id) {
618 published -> Timestamp,
624 person_mention (id) {
626 recipient_id -> Int4,
629 published -> Timestamp,
634 person_post_aggregates (id) {
638 read_comments -> Int8,
639 published -> Timestamp,
649 url -> Nullable<Varchar>,
650 body -> Nullable<Text>,
652 community_id -> Int4,
655 published -> Timestamp,
656 updated -> Nullable<Timestamp>,
659 embed_title -> Nullable<Text>,
660 embed_description -> Nullable<Text>,
661 thumbnail_url -> Nullable<Text>,
665 embed_video_url -> Nullable<Text>,
667 featured_community -> Bool,
668 featured_local -> Bool,
673 post_aggregates (id) {
680 published -> Timestamp,
681 newest_comment_time_necro -> Timestamp,
682 newest_comment_time -> Timestamp,
683 featured_community -> Bool,
684 featured_local -> Bool,
686 hot_rank_active -> Int4,
696 published -> Timestamp,
705 published -> Timestamp,
715 original_post_name -> Varchar,
716 original_post_url -> Nullable<Text>,
717 original_post_body -> Nullable<Text>,
720 resolver_id -> Nullable<Int4>,
721 published -> Timestamp,
722 updated -> Nullable<Timestamp>,
731 published -> Timestamp,
736 private_message (id) {
739 recipient_id -> Int4,
743 published -> Timestamp,
744 updated -> Nullable<Timestamp>,
752 private_message_report (id) {
755 private_message_id -> Int4,
756 original_pm_text -> Text,
759 resolver_id -> Nullable<Int4>,
760 published -> Timestamp,
761 updated -> Nullable<Timestamp>,
766 registration_application (id) {
768 local_user_id -> Int4,
770 admin_id -> Nullable<Int4>,
771 deny_reason -> Nullable<Text>,
772 published -> Timestamp,
779 jwt_secret -> Varchar,
788 sidebar -> Nullable<Text>,
789 published -> Timestamp,
790 updated -> Nullable<Timestamp>,
791 icon -> Nullable<Text>,
792 banner -> Nullable<Text>,
794 description -> Nullable<Varchar>,
797 last_refreshed_at -> Timestamp,
799 inbox_url -> Varchar,
800 private_key -> Nullable<Text>,
807 site_aggregates (id) {
814 users_active_day -> Int8,
815 users_active_week -> Int8,
816 users_active_month -> Int8,
817 users_active_half_year -> Int8,
832 local_site_id -> Int4,
834 published -> Timestamp,
835 updated -> Nullable<Timestamp>,
839 diesel::joinable!(admin_purge_comment -> person (admin_person_id));
840 diesel::joinable!(admin_purge_comment -> post (post_id));
841 diesel::joinable!(admin_purge_community -> person (admin_person_id));
842 diesel::joinable!(admin_purge_person -> person (admin_person_id));
843 diesel::joinable!(admin_purge_post -> community (community_id));
844 diesel::joinable!(admin_purge_post -> person (admin_person_id));
845 diesel::joinable!(comment -> language (language_id));
846 diesel::joinable!(comment -> person (creator_id));
847 diesel::joinable!(comment -> post (post_id));
848 diesel::joinable!(comment_aggregates -> comment (comment_id));
849 diesel::joinable!(comment_like -> comment (comment_id));
850 diesel::joinable!(comment_like -> person (person_id));
851 diesel::joinable!(comment_like -> post (post_id));
852 diesel::joinable!(comment_reply -> comment (comment_id));
853 diesel::joinable!(comment_reply -> person (recipient_id));
854 diesel::joinable!(comment_report -> comment (comment_id));
855 diesel::joinable!(comment_saved -> comment (comment_id));
856 diesel::joinable!(comment_saved -> person (person_id));
857 diesel::joinable!(community -> instance (instance_id));
858 diesel::joinable!(community_aggregates -> community (community_id));
859 diesel::joinable!(community_block -> community (community_id));
860 diesel::joinable!(community_block -> person (person_id));
861 diesel::joinable!(community_follower -> community (community_id));
862 diesel::joinable!(community_follower -> person (person_id));
863 diesel::joinable!(community_language -> community (community_id));
864 diesel::joinable!(community_language -> language (language_id));
865 diesel::joinable!(community_moderator -> community (community_id));
866 diesel::joinable!(community_moderator -> person (person_id));
867 diesel::joinable!(community_person_ban -> community (community_id));
868 diesel::joinable!(community_person_ban -> person (person_id));
869 diesel::joinable!(custom_emoji -> local_site (local_site_id));
870 diesel::joinable!(custom_emoji_keyword -> custom_emoji (custom_emoji_id));
871 diesel::joinable!(email_verification -> local_user (local_user_id));
872 diesel::joinable!(federation_allowlist -> instance (instance_id));
873 diesel::joinable!(federation_blocklist -> instance (instance_id));
874 diesel::joinable!(local_site -> site (site_id));
875 diesel::joinable!(local_site_rate_limit -> local_site (local_site_id));
876 diesel::joinable!(local_user -> person (person_id));
877 diesel::joinable!(local_user_language -> language (language_id));
878 diesel::joinable!(local_user_language -> local_user (local_user_id));
879 diesel::joinable!(mod_add_community -> community (community_id));
880 diesel::joinable!(mod_ban_from_community -> community (community_id));
881 diesel::joinable!(mod_feature_post -> person (mod_person_id));
882 diesel::joinable!(mod_feature_post -> post (post_id));
883 diesel::joinable!(mod_hide_community -> community (community_id));
884 diesel::joinable!(mod_hide_community -> person (mod_person_id));
885 diesel::joinable!(mod_lock_post -> person (mod_person_id));
886 diesel::joinable!(mod_lock_post -> post (post_id));
887 diesel::joinable!(mod_remove_comment -> comment (comment_id));
888 diesel::joinable!(mod_remove_comment -> person (mod_person_id));
889 diesel::joinable!(mod_remove_community -> community (community_id));
890 diesel::joinable!(mod_remove_community -> person (mod_person_id));
891 diesel::joinable!(mod_remove_post -> person (mod_person_id));
892 diesel::joinable!(mod_remove_post -> post (post_id));
893 diesel::joinable!(mod_transfer_community -> community (community_id));
894 diesel::joinable!(password_reset_request -> local_user (local_user_id));
895 diesel::joinable!(person -> instance (instance_id));
896 diesel::joinable!(person_aggregates -> person (person_id));
897 diesel::joinable!(person_ban -> person (person_id));
898 diesel::joinable!(person_mention -> comment (comment_id));
899 diesel::joinable!(person_mention -> person (recipient_id));
900 diesel::joinable!(person_post_aggregates -> person (person_id));
901 diesel::joinable!(person_post_aggregates -> post (post_id));
902 diesel::joinable!(post -> community (community_id));
903 diesel::joinable!(post -> language (language_id));
904 diesel::joinable!(post -> person (creator_id));
905 diesel::joinable!(post_aggregates -> post (post_id));
906 diesel::joinable!(post_like -> person (person_id));
907 diesel::joinable!(post_like -> post (post_id));
908 diesel::joinable!(post_read -> person (person_id));
909 diesel::joinable!(post_read -> post (post_id));
910 diesel::joinable!(post_report -> post (post_id));
911 diesel::joinable!(post_saved -> person (person_id));
912 diesel::joinable!(post_saved -> post (post_id));
913 diesel::joinable!(private_message_report -> private_message (private_message_id));
914 diesel::joinable!(registration_application -> local_user (local_user_id));
915 diesel::joinable!(registration_application -> person (admin_id));
916 diesel::joinable!(site -> instance (instance_id));
917 diesel::joinable!(site_aggregates -> site (site_id));
918 diesel::joinable!(site_language -> language (language_id));
919 diesel::joinable!(site_language -> site (site_id));
920 diesel::joinable!(tagline -> local_site (local_site_id));
922 diesel::allow_tables_to_appear_in_same_query!(
925 admin_purge_community,
936 community_aggregates,
941 community_person_ban,
943 custom_emoji_keyword,
945 federation_allowlist,
946 federation_blocklist,
950 local_site_rate_limit,
956 mod_ban_from_community,
961 mod_remove_community,
963 mod_transfer_community,
964 password_reset_request,
971 person_post_aggregates,
979 private_message_report,
980 registration_application,