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,
109 published -> Timestamp,
116 recipient_id -> Int4,
119 published -> Timestamp,
124 comment_report (id) {
128 original_comment_text -> Text,
131 resolver_id -> Nullable<Int4>,
132 published -> Timestamp,
133 updated -> Nullable<Timestamp>,
142 published -> Timestamp,
153 description -> Nullable<Text>,
155 published -> Timestamp,
156 updated -> Nullable<Timestamp>,
162 private_key -> Nullable<Text>,
164 last_refreshed_at -> Timestamp,
165 icon -> Nullable<Text>,
166 banner -> Nullable<Text>,
168 followers_url -> Varchar,
170 inbox_url -> Varchar,
172 shared_inbox_url -> Nullable<Varchar>,
174 posting_restricted_to_mods -> Bool,
177 moderators_url -> Nullable<Varchar>,
179 featured_url -> Nullable<Varchar>,
184 community_aggregates (id) {
186 community_id -> Int4,
190 published -> Timestamp,
191 users_active_day -> Int8,
192 users_active_week -> Int8,
193 users_active_month -> Int8,
194 users_active_half_year -> Int8,
200 community_block (id) {
203 community_id -> Int4,
204 published -> Timestamp,
209 community_follower (id) {
211 community_id -> Int4,
213 published -> Timestamp,
219 community_language (id) {
221 community_id -> Int4,
227 community_moderator (id) {
229 community_id -> Int4,
231 published -> Timestamp,
236 community_person_ban (id) {
238 community_id -> Int4,
240 published -> Timestamp,
241 expires -> Nullable<Timestamp>,
248 local_site_id -> Int4,
250 shortcode -> Varchar,
254 published -> Timestamp,
255 updated -> Nullable<Timestamp>,
260 custom_emoji_keyword (id) {
262 custom_emoji_id -> Int4,
269 email_verification (id) {
271 local_user_id -> Int4,
273 verification_token -> Text,
274 published -> Timestamp,
279 federation_allowlist (id) {
282 published -> Timestamp,
283 updated -> Nullable<Timestamp>,
288 federation_blocklist (id) {
291 published -> Timestamp,
292 updated -> Nullable<Timestamp>,
301 published -> Timestamp,
302 updated -> Nullable<Timestamp>,
304 software -> Nullable<Varchar>,
306 version -> Nullable<Varchar>,
320 use diesel::sql_types::{Bool, Int4, Nullable, Text, Timestamp, Varchar};
321 use super::sql_types::ListingTypeEnum;
322 use super::sql_types::RegistrationModeEnum;
328 enable_downvotes -> Bool,
330 community_creation_admin_only -> Bool,
331 require_email_verification -> Bool,
332 application_question -> Nullable<Text>,
333 private_instance -> Bool,
334 default_theme -> Text,
335 default_post_listing_type -> ListingTypeEnum,
336 legal_information -> Nullable<Text>,
337 hide_modlog_mod_names -> Bool,
338 application_email_admins -> Bool,
339 slur_filter_regex -> Nullable<Text>,
340 actor_name_max_length -> Int4,
341 federation_enabled -> Bool,
342 captcha_enabled -> Bool,
344 captcha_difficulty -> Varchar,
345 published -> Timestamp,
346 updated -> Nullable<Timestamp>,
347 registration_mode -> RegistrationModeEnum,
348 reports_email_admins -> Bool,
353 local_site_rate_limit (id) {
355 local_site_id -> Int4,
357 message_per_second -> Int4,
359 post_per_second -> Int4,
361 register_per_second -> Int4,
363 image_per_second -> Int4,
365 comment_per_second -> Int4,
367 search_per_second -> Int4,
368 published -> Timestamp,
369 updated -> Nullable<Timestamp>,
374 use diesel::sql_types::{Bool, Int4, Nullable, Text, Timestamp, Varchar};
375 use super::sql_types::SortTypeEnum;
376 use super::sql_types::ListingTypeEnum;
381 password_encrypted -> Text,
382 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,
638 url -> Nullable<Varchar>,
639 body -> Nullable<Text>,
641 community_id -> Int4,
644 published -> Timestamp,
645 updated -> Nullable<Timestamp>,
648 embed_title -> Nullable<Text>,
649 embed_description -> Nullable<Text>,
650 thumbnail_url -> Nullable<Text>,
654 embed_video_url -> Nullable<Text>,
656 featured_community -> Bool,
657 featured_local -> Bool,
662 post_aggregates (id) {
669 published -> Timestamp,
670 newest_comment_time_necro -> Timestamp,
671 newest_comment_time -> Timestamp,
672 featured_community -> Bool,
673 featured_local -> Bool,
675 hot_rank_active -> Int4,
685 published -> Timestamp,
694 published -> Timestamp,
704 original_post_name -> Varchar,
705 original_post_url -> Nullable<Text>,
706 original_post_body -> Nullable<Text>,
709 resolver_id -> Nullable<Int4>,
710 published -> Timestamp,
711 updated -> Nullable<Timestamp>,
720 published -> Timestamp,
725 private_message (id) {
728 recipient_id -> Int4,
732 published -> Timestamp,
733 updated -> Nullable<Timestamp>,
741 private_message_report (id) {
744 private_message_id -> Int4,
745 original_pm_text -> Text,
748 resolver_id -> Nullable<Int4>,
749 published -> Timestamp,
750 updated -> Nullable<Timestamp>,
755 registration_application (id) {
757 local_user_id -> Int4,
759 admin_id -> Nullable<Int4>,
760 deny_reason -> Nullable<Text>,
761 published -> Timestamp,
768 jwt_secret -> Varchar,
777 sidebar -> Nullable<Text>,
778 published -> Timestamp,
779 updated -> Nullable<Timestamp>,
780 icon -> Nullable<Text>,
781 banner -> Nullable<Text>,
783 description -> Nullable<Varchar>,
786 last_refreshed_at -> Timestamp,
788 inbox_url -> Varchar,
789 private_key -> Nullable<Text>,
796 site_aggregates (id) {
803 users_active_day -> Int8,
804 users_active_week -> Int8,
805 users_active_month -> Int8,
806 users_active_half_year -> Int8,
821 local_site_id -> Int4,
823 published -> Timestamp,
824 updated -> Nullable<Timestamp>,
828 diesel::joinable!(admin_purge_comment -> person (admin_person_id));
829 diesel::joinable!(admin_purge_comment -> post (post_id));
830 diesel::joinable!(admin_purge_community -> person (admin_person_id));
831 diesel::joinable!(admin_purge_person -> person (admin_person_id));
832 diesel::joinable!(admin_purge_post -> community (community_id));
833 diesel::joinable!(admin_purge_post -> person (admin_person_id));
834 diesel::joinable!(comment -> language (language_id));
835 diesel::joinable!(comment -> person (creator_id));
836 diesel::joinable!(comment -> post (post_id));
837 diesel::joinable!(comment_aggregates -> comment (comment_id));
838 diesel::joinable!(comment_like -> comment (comment_id));
839 diesel::joinable!(comment_like -> person (person_id));
840 diesel::joinable!(comment_like -> post (post_id));
841 diesel::joinable!(comment_reply -> comment (comment_id));
842 diesel::joinable!(comment_reply -> person (recipient_id));
843 diesel::joinable!(comment_report -> comment (comment_id));
844 diesel::joinable!(comment_saved -> comment (comment_id));
845 diesel::joinable!(comment_saved -> person (person_id));
846 diesel::joinable!(community -> instance (instance_id));
847 diesel::joinable!(community_aggregates -> community (community_id));
848 diesel::joinable!(community_block -> community (community_id));
849 diesel::joinable!(community_block -> person (person_id));
850 diesel::joinable!(community_follower -> community (community_id));
851 diesel::joinable!(community_follower -> person (person_id));
852 diesel::joinable!(community_language -> community (community_id));
853 diesel::joinable!(community_language -> language (language_id));
854 diesel::joinable!(community_moderator -> community (community_id));
855 diesel::joinable!(community_moderator -> person (person_id));
856 diesel::joinable!(community_person_ban -> community (community_id));
857 diesel::joinable!(community_person_ban -> person (person_id));
858 diesel::joinable!(custom_emoji -> local_site (local_site_id));
859 diesel::joinable!(custom_emoji_keyword -> custom_emoji (custom_emoji_id));
860 diesel::joinable!(email_verification -> local_user (local_user_id));
861 diesel::joinable!(federation_allowlist -> instance (instance_id));
862 diesel::joinable!(federation_blocklist -> instance (instance_id));
863 diesel::joinable!(local_site -> site (site_id));
864 diesel::joinable!(local_site_rate_limit -> local_site (local_site_id));
865 diesel::joinable!(local_user -> person (person_id));
866 diesel::joinable!(local_user_language -> language (language_id));
867 diesel::joinable!(local_user_language -> local_user (local_user_id));
868 diesel::joinable!(mod_add_community -> community (community_id));
869 diesel::joinable!(mod_ban_from_community -> community (community_id));
870 diesel::joinable!(mod_feature_post -> person (mod_person_id));
871 diesel::joinable!(mod_feature_post -> post (post_id));
872 diesel::joinable!(mod_hide_community -> community (community_id));
873 diesel::joinable!(mod_hide_community -> person (mod_person_id));
874 diesel::joinable!(mod_lock_post -> person (mod_person_id));
875 diesel::joinable!(mod_lock_post -> post (post_id));
876 diesel::joinable!(mod_remove_comment -> comment (comment_id));
877 diesel::joinable!(mod_remove_comment -> person (mod_person_id));
878 diesel::joinable!(mod_remove_community -> community (community_id));
879 diesel::joinable!(mod_remove_community -> person (mod_person_id));
880 diesel::joinable!(mod_remove_post -> person (mod_person_id));
881 diesel::joinable!(mod_remove_post -> post (post_id));
882 diesel::joinable!(mod_transfer_community -> community (community_id));
883 diesel::joinable!(password_reset_request -> local_user (local_user_id));
884 diesel::joinable!(person -> instance (instance_id));
885 diesel::joinable!(person_aggregates -> person (person_id));
886 diesel::joinable!(person_ban -> person (person_id));
887 diesel::joinable!(person_mention -> comment (comment_id));
888 diesel::joinable!(person_mention -> person (recipient_id));
889 diesel::joinable!(person_post_aggregates -> person (person_id));
890 diesel::joinable!(person_post_aggregates -> post (post_id));
891 diesel::joinable!(post -> community (community_id));
892 diesel::joinable!(post -> language (language_id));
893 diesel::joinable!(post -> person (creator_id));
894 diesel::joinable!(post_aggregates -> post (post_id));
895 diesel::joinable!(post_like -> person (person_id));
896 diesel::joinable!(post_like -> post (post_id));
897 diesel::joinable!(post_read -> person (person_id));
898 diesel::joinable!(post_read -> post (post_id));
899 diesel::joinable!(post_report -> post (post_id));
900 diesel::joinable!(post_saved -> person (person_id));
901 diesel::joinable!(post_saved -> post (post_id));
902 diesel::joinable!(private_message_report -> private_message (private_message_id));
903 diesel::joinable!(registration_application -> local_user (local_user_id));
904 diesel::joinable!(registration_application -> person (admin_id));
905 diesel::joinable!(site -> instance (instance_id));
906 diesel::joinable!(site_aggregates -> site (site_id));
907 diesel::joinable!(site_language -> language (language_id));
908 diesel::joinable!(site_language -> site (site_id));
909 diesel::joinable!(tagline -> local_site (local_site_id));
911 diesel::allow_tables_to_appear_in_same_query!(
914 admin_purge_community,
924 community_aggregates,
929 community_person_ban,
931 custom_emoji_keyword,
933 federation_allowlist,
934 federation_blocklist,
938 local_site_rate_limit,
944 mod_ban_from_community,
949 mod_remove_community,
951 mod_transfer_community,
952 password_reset_request,
959 person_post_aggregates,
967 private_message_report,
968 registration_application,