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,
414 local_user_language (id) {
416 local_user_id -> Int4,
424 mod_person_id -> Int4,
425 other_person_id -> Int4,
432 mod_add_community (id) {
434 mod_person_id -> Int4,
435 other_person_id -> Int4,
436 community_id -> Int4,
445 mod_person_id -> Int4,
446 other_person_id -> Int4,
447 reason -> Nullable<Text>,
449 expires -> Nullable<Timestamp>,
455 mod_ban_from_community (id) {
457 mod_person_id -> Int4,
458 other_person_id -> Int4,
459 community_id -> Int4,
460 reason -> Nullable<Text>,
462 expires -> Nullable<Timestamp>,
468 mod_feature_post (id) {
470 mod_person_id -> Int4,
474 is_featured_community -> Bool,
479 mod_hide_community (id) {
481 community_id -> Int4,
482 mod_person_id -> Int4,
484 reason -> Nullable<Text>,
492 mod_person_id -> Int4,
500 mod_remove_comment (id) {
502 mod_person_id -> Int4,
504 reason -> Nullable<Text>,
511 mod_remove_community (id) {
513 mod_person_id -> Int4,
514 community_id -> Int4,
515 reason -> Nullable<Text>,
517 expires -> Nullable<Timestamp>,
523 mod_remove_post (id) {
525 mod_person_id -> Int4,
527 reason -> Nullable<Text>,
534 mod_transfer_community (id) {
536 mod_person_id -> Int4,
537 other_person_id -> Int4,
538 community_id -> Int4,
544 password_reset_request (id) {
546 token_encrypted -> Text,
547 published -> Timestamp,
548 local_user_id -> Int4,
558 display_name -> Nullable<Varchar>,
559 avatar -> Nullable<Text>,
561 published -> Timestamp,
562 updated -> Nullable<Timestamp>,
565 bio -> Nullable<Text>,
567 private_key -> Nullable<Text>,
569 last_refreshed_at -> Timestamp,
570 banner -> Nullable<Text>,
573 inbox_url -> Varchar,
575 shared_inbox_url -> Nullable<Varchar>,
576 matrix_user_id -> Nullable<Text>,
579 ban_expires -> Nullable<Timestamp>,
585 person_aggregates (id) {
590 comment_count -> Int8,
591 comment_score -> Int8,
599 published -> Timestamp,
608 published -> Timestamp,
613 person_follower (id) {
617 published -> Timestamp,
623 person_mention (id) {
625 recipient_id -> Int4,
628 published -> Timestamp,
633 person_post_aggregates (id) {
637 read_comments -> Int8,
638 published -> Timestamp,
648 url -> Nullable<Varchar>,
649 body -> Nullable<Text>,
651 community_id -> Int4,
654 published -> Timestamp,
655 updated -> Nullable<Timestamp>,
658 embed_title -> Nullable<Text>,
659 embed_description -> Nullable<Text>,
660 thumbnail_url -> Nullable<Text>,
664 embed_video_url -> Nullable<Text>,
666 featured_community -> Bool,
667 featured_local -> Bool,
672 post_aggregates (id) {
679 published -> Timestamp,
680 newest_comment_time_necro -> Timestamp,
681 newest_comment_time -> Timestamp,
682 featured_community -> Bool,
683 featured_local -> Bool,
685 hot_rank_active -> Int4,
695 published -> Timestamp,
704 published -> Timestamp,
714 original_post_name -> Varchar,
715 original_post_url -> Nullable<Text>,
716 original_post_body -> Nullable<Text>,
719 resolver_id -> Nullable<Int4>,
720 published -> Timestamp,
721 updated -> Nullable<Timestamp>,
730 published -> Timestamp,
735 private_message (id) {
738 recipient_id -> Int4,
742 published -> Timestamp,
743 updated -> Nullable<Timestamp>,
751 private_message_report (id) {
754 private_message_id -> Int4,
755 original_pm_text -> Text,
758 resolver_id -> Nullable<Int4>,
759 published -> Timestamp,
760 updated -> Nullable<Timestamp>,
765 registration_application (id) {
767 local_user_id -> Int4,
769 admin_id -> Nullable<Int4>,
770 deny_reason -> Nullable<Text>,
771 published -> Timestamp,
778 jwt_secret -> Varchar,
787 sidebar -> Nullable<Text>,
788 published -> Timestamp,
789 updated -> Nullable<Timestamp>,
790 icon -> Nullable<Text>,
791 banner -> Nullable<Text>,
793 description -> Nullable<Varchar>,
796 last_refreshed_at -> Timestamp,
798 inbox_url -> Varchar,
799 private_key -> Nullable<Text>,
806 site_aggregates (id) {
813 users_active_day -> Int8,
814 users_active_week -> Int8,
815 users_active_month -> Int8,
816 users_active_half_year -> Int8,
831 local_site_id -> Int4,
833 published -> Timestamp,
834 updated -> Nullable<Timestamp>,
838 diesel::joinable!(admin_purge_comment -> person (admin_person_id));
839 diesel::joinable!(admin_purge_comment -> post (post_id));
840 diesel::joinable!(admin_purge_community -> person (admin_person_id));
841 diesel::joinable!(admin_purge_person -> person (admin_person_id));
842 diesel::joinable!(admin_purge_post -> community (community_id));
843 diesel::joinable!(admin_purge_post -> person (admin_person_id));
844 diesel::joinable!(comment -> language (language_id));
845 diesel::joinable!(comment -> person (creator_id));
846 diesel::joinable!(comment -> post (post_id));
847 diesel::joinable!(comment_aggregates -> comment (comment_id));
848 diesel::joinable!(comment_like -> comment (comment_id));
849 diesel::joinable!(comment_like -> person (person_id));
850 diesel::joinable!(comment_like -> post (post_id));
851 diesel::joinable!(comment_reply -> comment (comment_id));
852 diesel::joinable!(comment_reply -> person (recipient_id));
853 diesel::joinable!(comment_report -> comment (comment_id));
854 diesel::joinable!(comment_saved -> comment (comment_id));
855 diesel::joinable!(comment_saved -> person (person_id));
856 diesel::joinable!(community -> instance (instance_id));
857 diesel::joinable!(community_aggregates -> community (community_id));
858 diesel::joinable!(community_block -> community (community_id));
859 diesel::joinable!(community_block -> person (person_id));
860 diesel::joinable!(community_follower -> community (community_id));
861 diesel::joinable!(community_follower -> person (person_id));
862 diesel::joinable!(community_language -> community (community_id));
863 diesel::joinable!(community_language -> language (language_id));
864 diesel::joinable!(community_moderator -> community (community_id));
865 diesel::joinable!(community_moderator -> person (person_id));
866 diesel::joinable!(community_person_ban -> community (community_id));
867 diesel::joinable!(community_person_ban -> person (person_id));
868 diesel::joinable!(custom_emoji -> local_site (local_site_id));
869 diesel::joinable!(custom_emoji_keyword -> custom_emoji (custom_emoji_id));
870 diesel::joinable!(email_verification -> local_user (local_user_id));
871 diesel::joinable!(federation_allowlist -> instance (instance_id));
872 diesel::joinable!(federation_blocklist -> instance (instance_id));
873 diesel::joinable!(local_site -> site (site_id));
874 diesel::joinable!(local_site_rate_limit -> local_site (local_site_id));
875 diesel::joinable!(local_user -> person (person_id));
876 diesel::joinable!(local_user_language -> language (language_id));
877 diesel::joinable!(local_user_language -> local_user (local_user_id));
878 diesel::joinable!(mod_add_community -> community (community_id));
879 diesel::joinable!(mod_ban_from_community -> community (community_id));
880 diesel::joinable!(mod_feature_post -> person (mod_person_id));
881 diesel::joinable!(mod_feature_post -> post (post_id));
882 diesel::joinable!(mod_hide_community -> community (community_id));
883 diesel::joinable!(mod_hide_community -> person (mod_person_id));
884 diesel::joinable!(mod_lock_post -> person (mod_person_id));
885 diesel::joinable!(mod_lock_post -> post (post_id));
886 diesel::joinable!(mod_remove_comment -> comment (comment_id));
887 diesel::joinable!(mod_remove_comment -> person (mod_person_id));
888 diesel::joinable!(mod_remove_community -> community (community_id));
889 diesel::joinable!(mod_remove_community -> person (mod_person_id));
890 diesel::joinable!(mod_remove_post -> person (mod_person_id));
891 diesel::joinable!(mod_remove_post -> post (post_id));
892 diesel::joinable!(mod_transfer_community -> community (community_id));
893 diesel::joinable!(password_reset_request -> local_user (local_user_id));
894 diesel::joinable!(person -> instance (instance_id));
895 diesel::joinable!(person_aggregates -> person (person_id));
896 diesel::joinable!(person_ban -> person (person_id));
897 diesel::joinable!(person_mention -> comment (comment_id));
898 diesel::joinable!(person_mention -> person (recipient_id));
899 diesel::joinable!(person_post_aggregates -> person (person_id));
900 diesel::joinable!(person_post_aggregates -> post (post_id));
901 diesel::joinable!(post -> community (community_id));
902 diesel::joinable!(post -> language (language_id));
903 diesel::joinable!(post -> person (creator_id));
904 diesel::joinable!(post_aggregates -> post (post_id));
905 diesel::joinable!(post_like -> person (person_id));
906 diesel::joinable!(post_like -> post (post_id));
907 diesel::joinable!(post_read -> person (person_id));
908 diesel::joinable!(post_read -> post (post_id));
909 diesel::joinable!(post_report -> post (post_id));
910 diesel::joinable!(post_saved -> person (person_id));
911 diesel::joinable!(post_saved -> post (post_id));
912 diesel::joinable!(private_message_report -> private_message (private_message_id));
913 diesel::joinable!(registration_application -> local_user (local_user_id));
914 diesel::joinable!(registration_application -> person (admin_id));
915 diesel::joinable!(site -> instance (instance_id));
916 diesel::joinable!(site_aggregates -> site (site_id));
917 diesel::joinable!(site_language -> language (language_id));
918 diesel::joinable!(site_language -> site (site_id));
919 diesel::joinable!(tagline -> local_site (local_site_id));
921 diesel::allow_tables_to_appear_in_same_query!(
924 admin_purge_community,
935 community_aggregates,
940 community_person_ban,
942 custom_emoji_keyword,
944 federation_allowlist,
945 federation_blocklist,
949 local_site_rate_limit,
955 mod_ban_from_community,
960 mod_remove_community,
962 mod_transfer_community,
963 password_reset_request,
970 person_post_aggregates,
978 private_message_report,
979 registration_application,