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,
327 enable_federated_downvotes -> Bool,
329 community_creation_admin_only -> Bool,
330 require_email_verification -> Bool,
331 application_question -> Nullable<Text>,
332 private_instance -> Bool,
333 default_theme -> Text,
334 default_post_listing_type -> ListingTypeEnum,
335 legal_information -> Nullable<Text>,
336 hide_modlog_mod_names -> Bool,
337 application_email_admins -> Bool,
338 slur_filter_regex -> Nullable<Text>,
339 actor_name_max_length -> Int4,
340 federation_enabled -> Bool,
341 captcha_enabled -> Bool,
343 captcha_difficulty -> Varchar,
344 published -> Timestamp,
345 updated -> Nullable<Timestamp>,
346 registration_mode -> RegistrationModeEnum,
347 reports_email_admins -> Bool,
352 local_site_rate_limit (id) {
354 local_site_id -> Int4,
356 message_per_second -> Int4,
358 post_per_second -> Int4,
360 register_per_second -> Int4,
362 image_per_second -> Int4,
364 comment_per_second -> Int4,
366 search_per_second -> Int4,
367 published -> Timestamp,
368 updated -> Nullable<Timestamp>,
373 use diesel::sql_types::*;
374 use super::sql_types::SortTypeEnum;
375 use super::sql_types::ListingTypeEnum;
380 password_encrypted -> Text,
381 email -> Nullable<Text>,
384 default_sort_type -> SortTypeEnum,
385 default_listing_type -> ListingTypeEnum,
387 interface_language -> Varchar,
388 show_avatars -> Bool,
389 send_notifications_to_email -> Bool,
390 validator_time -> Timestamp,
392 show_bot_accounts -> Bool,
393 show_read_posts -> Bool,
394 show_new_post_notifs -> Bool,
395 email_verified -> Bool,
396 accepted_application -> Bool,
397 totp_2fa_secret -> Nullable<Text>,
398 totp_2fa_url -> Nullable<Text>,
399 open_links_in_new_tab -> Bool,
402 infinite_scroll_enabled -> Bool,
407 local_user_language (id) {
409 local_user_id -> Int4,
417 mod_person_id -> Int4,
418 other_person_id -> Int4,
425 mod_add_community (id) {
427 mod_person_id -> Int4,
428 other_person_id -> Int4,
429 community_id -> Int4,
438 mod_person_id -> Int4,
439 other_person_id -> Int4,
440 reason -> Nullable<Text>,
442 expires -> Nullable<Timestamp>,
448 mod_ban_from_community (id) {
450 mod_person_id -> Int4,
451 other_person_id -> Int4,
452 community_id -> Int4,
453 reason -> Nullable<Text>,
455 expires -> Nullable<Timestamp>,
461 mod_feature_post (id) {
463 mod_person_id -> Int4,
467 is_featured_community -> Bool,
472 mod_hide_community (id) {
474 community_id -> Int4,
475 mod_person_id -> Int4,
477 reason -> Nullable<Text>,
485 mod_person_id -> Int4,
493 mod_remove_comment (id) {
495 mod_person_id -> Int4,
497 reason -> Nullable<Text>,
504 mod_remove_community (id) {
506 mod_person_id -> Int4,
507 community_id -> Int4,
508 reason -> Nullable<Text>,
510 expires -> Nullable<Timestamp>,
516 mod_remove_post (id) {
518 mod_person_id -> Int4,
520 reason -> Nullable<Text>,
527 mod_transfer_community (id) {
529 mod_person_id -> Int4,
530 other_person_id -> Int4,
531 community_id -> Int4,
537 password_reset_request (id) {
540 published -> Timestamp,
541 local_user_id -> Int4,
551 display_name -> Nullable<Varchar>,
552 avatar -> Nullable<Text>,
554 published -> Timestamp,
555 updated -> Nullable<Timestamp>,
558 bio -> Nullable<Text>,
560 private_key -> Nullable<Text>,
562 last_refreshed_at -> Timestamp,
563 banner -> Nullable<Text>,
566 inbox_url -> Varchar,
568 shared_inbox_url -> Nullable<Varchar>,
569 matrix_user_id -> Nullable<Text>,
572 ban_expires -> Nullable<Timestamp>,
578 person_aggregates (id) {
583 comment_count -> Int8,
584 comment_score -> Int8,
592 published -> Timestamp,
601 published -> Timestamp,
606 person_follower (id) {
610 published -> Timestamp,
616 person_mention (id) {
618 recipient_id -> Int4,
621 published -> Timestamp,
626 person_post_aggregates (id) {
630 read_comments -> Int8,
631 published -> Timestamp,
641 url -> Nullable<Varchar>,
642 body -> Nullable<Text>,
644 community_id -> Int4,
647 published -> Timestamp,
648 updated -> Nullable<Timestamp>,
651 embed_title -> Nullable<Text>,
652 embed_description -> Nullable<Text>,
653 thumbnail_url -> Nullable<Text>,
657 embed_video_url -> Nullable<Text>,
659 featured_community -> Bool,
660 featured_local -> Bool,
665 post_aggregates (id) {
672 published -> Timestamp,
673 newest_comment_time_necro -> Timestamp,
674 newest_comment_time -> Timestamp,
675 featured_community -> Bool,
676 featured_local -> Bool,
678 hot_rank_active -> Int4,
679 community_id -> Int4,
681 controversy_rank -> Float8,
691 published -> Timestamp,
700 published -> Timestamp,
710 original_post_name -> Varchar,
711 original_post_url -> Nullable<Text>,
712 original_post_body -> Nullable<Text>,
715 resolver_id -> Nullable<Int4>,
716 published -> Timestamp,
717 updated -> Nullable<Timestamp>,
726 published -> Timestamp,
731 private_message (id) {
734 recipient_id -> Int4,
738 published -> Timestamp,
739 updated -> Nullable<Timestamp>,
747 private_message_report (id) {
750 private_message_id -> Int4,
751 original_pm_text -> Text,
754 resolver_id -> Nullable<Int4>,
755 published -> Timestamp,
756 updated -> Nullable<Timestamp>,
761 received_activity (id) {
764 published -> Timestamp,
769 registration_application (id) {
771 local_user_id -> Int4,
773 admin_id -> Nullable<Int4>,
774 deny_reason -> Nullable<Text>,
775 published -> Timestamp,
782 jwt_secret -> Varchar,
792 published -> Timestamp,
801 sidebar -> Nullable<Text>,
802 published -> Timestamp,
803 updated -> Nullable<Timestamp>,
804 icon -> Nullable<Text>,
805 banner -> Nullable<Text>,
807 description -> Nullable<Varchar>,
810 last_refreshed_at -> Timestamp,
812 inbox_url -> Varchar,
813 private_key -> Nullable<Text>,
820 site_aggregates (id) {
827 users_active_day -> Int8,
828 users_active_week -> Int8,
829 users_active_month -> Int8,
830 users_active_half_year -> Int8,
845 local_site_id -> Int4,
847 published -> Timestamp,
848 updated -> Nullable<Timestamp>,
852 diesel::joinable!(admin_purge_comment -> person (admin_person_id));
853 diesel::joinable!(admin_purge_comment -> post (post_id));
854 diesel::joinable!(admin_purge_community -> person (admin_person_id));
855 diesel::joinable!(admin_purge_person -> person (admin_person_id));
856 diesel::joinable!(admin_purge_post -> community (community_id));
857 diesel::joinable!(admin_purge_post -> person (admin_person_id));
858 diesel::joinable!(comment -> language (language_id));
859 diesel::joinable!(comment -> person (creator_id));
860 diesel::joinable!(comment -> post (post_id));
861 diesel::joinable!(comment_aggregates -> comment (comment_id));
862 diesel::joinable!(comment_like -> comment (comment_id));
863 diesel::joinable!(comment_like -> person (person_id));
864 diesel::joinable!(comment_like -> post (post_id));
865 diesel::joinable!(comment_reply -> comment (comment_id));
866 diesel::joinable!(comment_reply -> person (recipient_id));
867 diesel::joinable!(comment_report -> comment (comment_id));
868 diesel::joinable!(comment_saved -> comment (comment_id));
869 diesel::joinable!(comment_saved -> person (person_id));
870 diesel::joinable!(community -> instance (instance_id));
871 diesel::joinable!(community_aggregates -> community (community_id));
872 diesel::joinable!(community_block -> community (community_id));
873 diesel::joinable!(community_block -> person (person_id));
874 diesel::joinable!(community_follower -> community (community_id));
875 diesel::joinable!(community_follower -> person (person_id));
876 diesel::joinable!(community_language -> community (community_id));
877 diesel::joinable!(community_language -> language (language_id));
878 diesel::joinable!(community_moderator -> community (community_id));
879 diesel::joinable!(community_moderator -> person (person_id));
880 diesel::joinable!(community_person_ban -> community (community_id));
881 diesel::joinable!(community_person_ban -> person (person_id));
882 diesel::joinable!(custom_emoji -> local_site (local_site_id));
883 diesel::joinable!(custom_emoji_keyword -> custom_emoji (custom_emoji_id));
884 diesel::joinable!(email_verification -> local_user (local_user_id));
885 diesel::joinable!(federation_allowlist -> instance (instance_id));
886 diesel::joinable!(federation_blocklist -> instance (instance_id));
887 diesel::joinable!(local_site -> site (site_id));
888 diesel::joinable!(local_site_rate_limit -> local_site (local_site_id));
889 diesel::joinable!(local_user -> person (person_id));
890 diesel::joinable!(local_user_language -> language (language_id));
891 diesel::joinable!(local_user_language -> local_user (local_user_id));
892 diesel::joinable!(mod_add_community -> community (community_id));
893 diesel::joinable!(mod_ban_from_community -> community (community_id));
894 diesel::joinable!(mod_feature_post -> person (mod_person_id));
895 diesel::joinable!(mod_feature_post -> post (post_id));
896 diesel::joinable!(mod_hide_community -> community (community_id));
897 diesel::joinable!(mod_hide_community -> person (mod_person_id));
898 diesel::joinable!(mod_lock_post -> person (mod_person_id));
899 diesel::joinable!(mod_lock_post -> post (post_id));
900 diesel::joinable!(mod_remove_comment -> comment (comment_id));
901 diesel::joinable!(mod_remove_comment -> person (mod_person_id));
902 diesel::joinable!(mod_remove_community -> community (community_id));
903 diesel::joinable!(mod_remove_community -> person (mod_person_id));
904 diesel::joinable!(mod_remove_post -> person (mod_person_id));
905 diesel::joinable!(mod_remove_post -> post (post_id));
906 diesel::joinable!(mod_transfer_community -> community (community_id));
907 diesel::joinable!(password_reset_request -> local_user (local_user_id));
908 diesel::joinable!(person -> instance (instance_id));
909 diesel::joinable!(person_aggregates -> person (person_id));
910 diesel::joinable!(person_ban -> person (person_id));
911 diesel::joinable!(person_mention -> comment (comment_id));
912 diesel::joinable!(person_mention -> person (recipient_id));
913 diesel::joinable!(person_post_aggregates -> person (person_id));
914 diesel::joinable!(person_post_aggregates -> post (post_id));
915 diesel::joinable!(post -> community (community_id));
916 diesel::joinable!(post -> language (language_id));
917 diesel::joinable!(post -> person (creator_id));
918 diesel::joinable!(post_aggregates -> community (community_id));
919 diesel::joinable!(post_aggregates -> person (creator_id));
920 diesel::joinable!(post_aggregates -> post (post_id));
921 diesel::joinable!(post_like -> person (person_id));
922 diesel::joinable!(post_like -> post (post_id));
923 diesel::joinable!(post_read -> person (person_id));
924 diesel::joinable!(post_read -> post (post_id));
925 diesel::joinable!(post_report -> post (post_id));
926 diesel::joinable!(post_saved -> person (person_id));
927 diesel::joinable!(post_saved -> post (post_id));
928 diesel::joinable!(private_message_report -> private_message (private_message_id));
929 diesel::joinable!(registration_application -> local_user (local_user_id));
930 diesel::joinable!(registration_application -> person (admin_id));
931 diesel::joinable!(site -> instance (instance_id));
932 diesel::joinable!(site_aggregates -> site (site_id));
933 diesel::joinable!(site_language -> language (language_id));
934 diesel::joinable!(site_language -> site (site_id));
935 diesel::joinable!(tagline -> local_site (local_site_id));
937 diesel::allow_tables_to_appear_in_same_query!(
939 admin_purge_community,
950 community_aggregates,
955 community_person_ban,
957 custom_emoji_keyword,
959 federation_allowlist,
960 federation_blocklist,
964 local_site_rate_limit,
970 mod_ban_from_community,
975 mod_remove_community,
977 mod_transfer_community,
978 password_reset_request,
985 person_post_aggregates,
993 private_message_report,
995 registration_application,