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>,
68 captcha_answer (uuid) {
76 use diesel::sql_types::{Bool, Int4, Nullable, Text, Timestamp, Varchar};
77 use diesel_ltree::sql_types::Ltree;
85 published -> Timestamp,
86 updated -> Nullable<Timestamp>,
92 distinguished -> Bool,
98 comment_aggregates (id) {
104 published -> Timestamp,
117 published -> Timestamp,
124 recipient_id -> Int4,
127 published -> Timestamp,
132 comment_report (id) {
136 original_comment_text -> Text,
139 resolver_id -> Nullable<Int4>,
140 published -> Timestamp,
141 updated -> Nullable<Timestamp>,
150 published -> Timestamp,
161 description -> Nullable<Text>,
163 published -> Timestamp,
164 updated -> Nullable<Timestamp>,
170 private_key -> Nullable<Text>,
172 last_refreshed_at -> Timestamp,
173 icon -> Nullable<Text>,
174 banner -> Nullable<Text>,
176 followers_url -> Varchar,
178 inbox_url -> Varchar,
180 shared_inbox_url -> Nullable<Varchar>,
182 posting_restricted_to_mods -> Bool,
185 moderators_url -> Nullable<Varchar>,
187 featured_url -> Nullable<Varchar>,
192 community_aggregates (id) {
194 community_id -> Int4,
198 published -> Timestamp,
199 users_active_day -> Int8,
200 users_active_week -> Int8,
201 users_active_month -> Int8,
202 users_active_half_year -> Int8,
208 community_block (id) {
211 community_id -> Int4,
212 published -> Timestamp,
217 community_follower (id) {
219 community_id -> Int4,
221 published -> Timestamp,
227 community_language (id) {
229 community_id -> Int4,
235 community_moderator (id) {
237 community_id -> Int4,
239 published -> Timestamp,
244 community_person_ban (id) {
246 community_id -> Int4,
248 published -> Timestamp,
249 expires -> Nullable<Timestamp>,
256 local_site_id -> Int4,
258 shortcode -> Varchar,
262 published -> Timestamp,
263 updated -> Nullable<Timestamp>,
268 custom_emoji_keyword (id) {
270 custom_emoji_id -> Int4,
277 email_verification (id) {
279 local_user_id -> Int4,
281 verification_token -> Text,
282 published -> Timestamp,
287 federation_allowlist (id) {
290 published -> Timestamp,
291 updated -> Nullable<Timestamp>,
296 federation_blocklist (id) {
299 published -> Timestamp,
300 updated -> Nullable<Timestamp>,
309 published -> Timestamp,
310 updated -> Nullable<Timestamp>,
312 software -> Nullable<Varchar>,
314 version -> Nullable<Varchar>,
328 use diesel::sql_types::{Bool, Int4, Nullable, Text, Timestamp, Varchar};
329 use super::sql_types::ListingTypeEnum;
330 use super::sql_types::RegistrationModeEnum;
336 enable_downvotes -> Bool,
338 community_creation_admin_only -> Bool,
339 require_email_verification -> Bool,
340 application_question -> Nullable<Text>,
341 private_instance -> Bool,
342 default_theme -> Text,
343 default_post_listing_type -> ListingTypeEnum,
344 legal_information -> Nullable<Text>,
345 hide_modlog_mod_names -> Bool,
346 application_email_admins -> Bool,
347 slur_filter_regex -> Nullable<Text>,
348 actor_name_max_length -> Int4,
349 federation_enabled -> Bool,
350 federation_worker_count -> Int4,
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::{Bool, Int4, Nullable, Text, Timestamp, Varchar};
384 use super::sql_types::SortTypeEnum;
385 use super::sql_types::ListingTypeEnum;
390 password_encrypted -> Text,
391 email -> Nullable<Text>,
395 default_sort_type -> SortTypeEnum,
396 default_listing_type -> ListingTypeEnum,
398 interface_language -> Varchar,
399 show_avatars -> Bool,
400 send_notifications_to_email -> Bool,
401 validator_time -> Timestamp,
403 show_bot_accounts -> Bool,
404 show_read_posts -> Bool,
405 show_new_post_notifs -> Bool,
406 email_verified -> Bool,
407 accepted_application -> Bool,
408 totp_2fa_secret -> Nullable<Text>,
409 totp_2fa_url -> Nullable<Text>,
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,