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 use diesel::sql_types::{Bool, Int4, Nullable, Text, Timestamp, Varchar};
69 use diesel_ltree::sql_types::Ltree;
77 published -> Timestamp,
78 updated -> Nullable<Timestamp>,
84 distinguished -> Bool,
90 comment_aggregates (id) {
96 published -> Timestamp,
108 published -> Timestamp,
115 recipient_id -> Int4,
118 published -> Timestamp,
123 comment_report (id) {
127 original_comment_text -> Text,
130 resolver_id -> Nullable<Int4>,
131 published -> Timestamp,
132 updated -> Nullable<Timestamp>,
141 published -> Timestamp,
152 description -> Nullable<Text>,
154 published -> Timestamp,
155 updated -> Nullable<Timestamp>,
161 private_key -> Nullable<Text>,
163 last_refreshed_at -> Timestamp,
164 icon -> Nullable<Text>,
165 banner -> Nullable<Text>,
167 followers_url -> Varchar,
169 inbox_url -> Varchar,
171 shared_inbox_url -> Nullable<Varchar>,
173 posting_restricted_to_mods -> Bool,
176 moderators_url -> Nullable<Varchar>,
178 featured_url -> Nullable<Varchar>,
183 community_aggregates (id) {
185 community_id -> Int4,
189 published -> Timestamp,
190 users_active_day -> Int8,
191 users_active_week -> Int8,
192 users_active_month -> Int8,
193 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::{Bool, Int4, Nullable, Text, Timestamp, Varchar};
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 federation_worker_count -> Int4,
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::{Bool, Int4, Nullable, Text, Timestamp, Varchar};
374 use super::sql_types::SortTypeEnum;
375 use super::sql_types::ListingTypeEnum;
380 password_encrypted -> Text,
381 email -> Nullable<Text>,
385 default_sort_type -> SortTypeEnum,
386 default_listing_type -> ListingTypeEnum,
388 interface_language -> Varchar,
389 show_avatars -> Bool,
390 send_notifications_to_email -> Bool,
391 validator_time -> Timestamp,
393 show_bot_accounts -> Bool,
394 show_read_posts -> Bool,
395 show_new_post_notifs -> Bool,
396 email_verified -> Bool,
397 accepted_application -> Bool,
398 totp_2fa_secret -> Nullable<Text>,
399 totp_2fa_url -> Nullable<Text>,
404 local_user_language (id) {
406 local_user_id -> Int4,
414 mod_person_id -> Int4,
415 other_person_id -> Int4,
422 mod_add_community (id) {
424 mod_person_id -> Int4,
425 other_person_id -> Int4,
426 community_id -> Int4,
435 mod_person_id -> Int4,
436 other_person_id -> Int4,
437 reason -> Nullable<Text>,
439 expires -> Nullable<Timestamp>,
445 mod_ban_from_community (id) {
447 mod_person_id -> Int4,
448 other_person_id -> Int4,
449 community_id -> Int4,
450 reason -> Nullable<Text>,
452 expires -> Nullable<Timestamp>,
458 mod_feature_post (id) {
460 mod_person_id -> Int4,
464 is_featured_community -> Bool,
469 mod_hide_community (id) {
471 community_id -> Int4,
472 mod_person_id -> Int4,
474 reason -> Nullable<Text>,
482 mod_person_id -> Int4,
490 mod_remove_comment (id) {
492 mod_person_id -> Int4,
494 reason -> Nullable<Text>,
501 mod_remove_community (id) {
503 mod_person_id -> Int4,
504 community_id -> Int4,
505 reason -> Nullable<Text>,
507 expires -> Nullable<Timestamp>,
513 mod_remove_post (id) {
515 mod_person_id -> Int4,
517 reason -> Nullable<Text>,
524 mod_transfer_community (id) {
526 mod_person_id -> Int4,
527 other_person_id -> Int4,
528 community_id -> Int4,
534 password_reset_request (id) {
536 token_encrypted -> Text,
537 published -> Timestamp,
538 local_user_id -> Int4,
548 display_name -> Nullable<Varchar>,
549 avatar -> Nullable<Text>,
551 published -> Timestamp,
552 updated -> Nullable<Timestamp>,
555 bio -> Nullable<Text>,
557 private_key -> Nullable<Text>,
559 last_refreshed_at -> Timestamp,
560 banner -> Nullable<Text>,
563 inbox_url -> Varchar,
565 shared_inbox_url -> Nullable<Varchar>,
566 matrix_user_id -> Nullable<Text>,
569 ban_expires -> Nullable<Timestamp>,
575 person_aggregates (id) {
580 comment_count -> Int8,
581 comment_score -> Int8,
589 published -> Timestamp,
598 published -> Timestamp,
603 person_follower (id) {
607 published -> Timestamp,
613 person_mention (id) {
615 recipient_id -> Int4,
618 published -> Timestamp,
623 person_post_aggregates (id) {
627 read_comments -> Int8,
628 published -> Timestamp,
637 url -> Nullable<Text>,
638 body -> Nullable<Text>,
640 community_id -> Int4,
643 published -> Timestamp,
644 updated -> Nullable<Timestamp>,
647 embed_title -> Nullable<Text>,
648 embed_description -> Nullable<Text>,
649 thumbnail_url -> Nullable<Text>,
653 embed_video_url -> Nullable<Text>,
655 featured_community -> Bool,
656 featured_local -> Bool,
661 post_aggregates (id) {
668 published -> Timestamp,
669 newest_comment_time_necro -> Timestamp,
670 newest_comment_time -> Timestamp,
671 featured_community -> Bool,
672 featured_local -> Bool,
682 published -> Timestamp,
691 published -> Timestamp,
701 original_post_name -> Varchar,
702 original_post_url -> Nullable<Text>,
703 original_post_body -> Nullable<Text>,
706 resolver_id -> Nullable<Int4>,
707 published -> Timestamp,
708 updated -> Nullable<Timestamp>,
717 published -> Timestamp,
722 private_message (id) {
725 recipient_id -> Int4,
729 published -> Timestamp,
730 updated -> Nullable<Timestamp>,
738 private_message_report (id) {
741 private_message_id -> Int4,
742 original_pm_text -> Text,
745 resolver_id -> Nullable<Int4>,
746 published -> Timestamp,
747 updated -> Nullable<Timestamp>,
752 registration_application (id) {
754 local_user_id -> Int4,
756 admin_id -> Nullable<Int4>,
757 deny_reason -> Nullable<Text>,
758 published -> Timestamp,
765 jwt_secret -> Varchar,
774 sidebar -> Nullable<Text>,
775 published -> Timestamp,
776 updated -> Nullable<Timestamp>,
777 icon -> Nullable<Text>,
778 banner -> Nullable<Text>,
780 description -> Nullable<Varchar>,
783 last_refreshed_at -> Timestamp,
785 inbox_url -> Varchar,
786 private_key -> Nullable<Text>,
793 site_aggregates (id) {
800 users_active_day -> Int8,
801 users_active_week -> Int8,
802 users_active_month -> Int8,
803 users_active_half_year -> Int8,
818 local_site_id -> Int4,
820 published -> Timestamp,
821 updated -> Nullable<Timestamp>,
825 diesel::joinable!(admin_purge_comment -> person (admin_person_id));
826 diesel::joinable!(admin_purge_comment -> post (post_id));
827 diesel::joinable!(admin_purge_community -> person (admin_person_id));
828 diesel::joinable!(admin_purge_person -> person (admin_person_id));
829 diesel::joinable!(admin_purge_post -> community (community_id));
830 diesel::joinable!(admin_purge_post -> person (admin_person_id));
831 diesel::joinable!(comment -> language (language_id));
832 diesel::joinable!(comment -> person (creator_id));
833 diesel::joinable!(comment -> post (post_id));
834 diesel::joinable!(comment_aggregates -> comment (comment_id));
835 diesel::joinable!(comment_like -> comment (comment_id));
836 diesel::joinable!(comment_like -> person (person_id));
837 diesel::joinable!(comment_like -> post (post_id));
838 diesel::joinable!(comment_reply -> comment (comment_id));
839 diesel::joinable!(comment_reply -> person (recipient_id));
840 diesel::joinable!(comment_report -> comment (comment_id));
841 diesel::joinable!(comment_saved -> comment (comment_id));
842 diesel::joinable!(comment_saved -> person (person_id));
843 diesel::joinable!(community -> instance (instance_id));
844 diesel::joinable!(community_aggregates -> community (community_id));
845 diesel::joinable!(community_block -> community (community_id));
846 diesel::joinable!(community_block -> person (person_id));
847 diesel::joinable!(community_follower -> community (community_id));
848 diesel::joinable!(community_follower -> person (person_id));
849 diesel::joinable!(community_language -> community (community_id));
850 diesel::joinable!(community_language -> language (language_id));
851 diesel::joinable!(community_moderator -> community (community_id));
852 diesel::joinable!(community_moderator -> person (person_id));
853 diesel::joinable!(community_person_ban -> community (community_id));
854 diesel::joinable!(community_person_ban -> person (person_id));
855 diesel::joinable!(custom_emoji -> local_site (local_site_id));
856 diesel::joinable!(custom_emoji_keyword -> custom_emoji (custom_emoji_id));
857 diesel::joinable!(email_verification -> local_user (local_user_id));
858 diesel::joinable!(federation_allowlist -> instance (instance_id));
859 diesel::joinable!(federation_blocklist -> instance (instance_id));
860 diesel::joinable!(local_site -> site (site_id));
861 diesel::joinable!(local_site_rate_limit -> local_site (local_site_id));
862 diesel::joinable!(local_user -> person (person_id));
863 diesel::joinable!(local_user_language -> language (language_id));
864 diesel::joinable!(local_user_language -> local_user (local_user_id));
865 diesel::joinable!(mod_add_community -> community (community_id));
866 diesel::joinable!(mod_ban_from_community -> community (community_id));
867 diesel::joinable!(mod_feature_post -> person (mod_person_id));
868 diesel::joinable!(mod_feature_post -> post (post_id));
869 diesel::joinable!(mod_hide_community -> community (community_id));
870 diesel::joinable!(mod_hide_community -> person (mod_person_id));
871 diesel::joinable!(mod_lock_post -> person (mod_person_id));
872 diesel::joinable!(mod_lock_post -> post (post_id));
873 diesel::joinable!(mod_remove_comment -> comment (comment_id));
874 diesel::joinable!(mod_remove_comment -> person (mod_person_id));
875 diesel::joinable!(mod_remove_community -> community (community_id));
876 diesel::joinable!(mod_remove_community -> person (mod_person_id));
877 diesel::joinable!(mod_remove_post -> person (mod_person_id));
878 diesel::joinable!(mod_remove_post -> post (post_id));
879 diesel::joinable!(mod_transfer_community -> community (community_id));
880 diesel::joinable!(password_reset_request -> local_user (local_user_id));
881 diesel::joinable!(person -> instance (instance_id));
882 diesel::joinable!(person_aggregates -> person (person_id));
883 diesel::joinable!(person_ban -> person (person_id));
884 diesel::joinable!(person_mention -> comment (comment_id));
885 diesel::joinable!(person_mention -> person (recipient_id));
886 diesel::joinable!(person_post_aggregates -> person (person_id));
887 diesel::joinable!(person_post_aggregates -> post (post_id));
888 diesel::joinable!(post -> community (community_id));
889 diesel::joinable!(post -> language (language_id));
890 diesel::joinable!(post -> person (creator_id));
891 diesel::joinable!(post_aggregates -> post (post_id));
892 diesel::joinable!(post_like -> person (person_id));
893 diesel::joinable!(post_like -> post (post_id));
894 diesel::joinable!(post_read -> person (person_id));
895 diesel::joinable!(post_read -> post (post_id));
896 diesel::joinable!(post_report -> post (post_id));
897 diesel::joinable!(post_saved -> person (person_id));
898 diesel::joinable!(post_saved -> post (post_id));
899 diesel::joinable!(private_message_report -> private_message (private_message_id));
900 diesel::joinable!(registration_application -> local_user (local_user_id));
901 diesel::joinable!(registration_application -> person (admin_id));
902 diesel::joinable!(site -> instance (instance_id));
903 diesel::joinable!(site_aggregates -> site (site_id));
904 diesel::joinable!(site_language -> language (language_id));
905 diesel::joinable!(site_language -> site (site_id));
906 diesel::joinable!(tagline -> local_site (local_site_id));
908 diesel::allow_tables_to_appear_in_same_query!(
911 admin_purge_community,
921 community_aggregates,
926 community_person_ban,
928 custom_emoji_keyword,
930 federation_allowlist,
931 federation_blocklist,
935 local_site_rate_limit,
941 mod_ban_from_community,
946 mod_remove_community,
948 mod_transfer_community,
949 password_reset_request,
956 person_post_aggregates,
964 private_message_report,
965 registration_application,