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::*;
69 use diesel_ltree::sql_types::Ltree;
77 published -> Timestamp,
78 updated -> Nullable<Timestamp>,
83 distinguished -> Bool,
89 comment_aggregates (id) {
95 published -> Timestamp,
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,
149 description -> Nullable<Text>,
151 published -> Timestamp,
152 updated -> Nullable<Timestamp>,
157 private_key -> Nullable<Text>,
159 last_refreshed_at -> Timestamp,
160 icon -> Nullable<Text>,
161 banner -> Nullable<Text>,
162 followers_url -> Varchar,
163 inbox_url -> Varchar,
164 shared_inbox_url -> Nullable<Varchar>,
166 posting_restricted_to_mods -> Bool,
168 moderators_url -> Nullable<Varchar>,
169 featured_url -> Nullable<Varchar>,
174 community_aggregates (id) {
176 community_id -> Int4,
180 published -> Timestamp,
181 users_active_day -> Int8,
182 users_active_week -> Int8,
183 users_active_month -> Int8,
184 users_active_half_year -> Int8,
189 community_block (id) {
192 community_id -> Int4,
193 published -> Timestamp,
198 community_follower (id) {
200 community_id -> Int4,
202 published -> Timestamp,
208 community_language (id) {
210 community_id -> Int4,
216 community_moderator (id) {
218 community_id -> Int4,
220 published -> Timestamp,
225 community_person_ban (id) {
227 community_id -> Int4,
229 published -> Timestamp,
230 expires -> Nullable<Timestamp>,
237 local_site_id -> Int4,
238 shortcode -> Varchar,
242 published -> Timestamp,
243 updated -> Nullable<Timestamp>,
248 custom_emoji_keyword (id) {
250 custom_emoji_id -> Int4,
256 email_verification (id) {
258 local_user_id -> Int4,
260 verification_token -> Text,
261 published -> Timestamp,
266 federation_allowlist (id) {
269 published -> Timestamp,
270 updated -> Nullable<Timestamp>,
275 federation_blocklist (id) {
278 published -> Timestamp,
279 updated -> Nullable<Timestamp>,
287 published -> Timestamp,
288 updated -> Nullable<Timestamp>,
289 software -> Nullable<Varchar>,
290 version -> Nullable<Varchar>,
303 use diesel::sql_types::*;
304 use super::sql_types::ListingTypeEnum;
305 use super::sql_types::RegistrationModeEnum;
311 enable_downvotes -> Bool,
313 community_creation_admin_only -> Bool,
314 require_email_verification -> Bool,
315 application_question -> Nullable<Text>,
316 private_instance -> Bool,
317 default_theme -> Text,
318 default_post_listing_type -> ListingTypeEnum,
319 legal_information -> Nullable<Text>,
320 hide_modlog_mod_names -> Bool,
321 application_email_admins -> Bool,
322 slur_filter_regex -> Nullable<Text>,
323 actor_name_max_length -> Int4,
324 federation_enabled -> Bool,
325 federation_debug -> Bool,
326 federation_worker_count -> Int4,
327 captcha_enabled -> Bool,
328 captcha_difficulty -> Varchar,
329 published -> Timestamp,
330 updated -> Nullable<Timestamp>,
331 registration_mode -> RegistrationModeEnum,
332 reports_email_admins -> Bool,
337 local_site_rate_limit (id) {
339 local_site_id -> Int4,
341 message_per_second -> Int4,
343 post_per_second -> Int4,
345 register_per_second -> Int4,
347 image_per_second -> Int4,
349 comment_per_second -> Int4,
351 search_per_second -> Int4,
352 published -> Timestamp,
353 updated -> Nullable<Timestamp>,
358 use diesel::sql_types::*;
359 use super::sql_types::SortTypeEnum;
360 use super::sql_types::ListingTypeEnum;
365 password_encrypted -> Text,
366 email -> Nullable<Text>,
369 default_sort_type -> SortTypeEnum,
370 default_listing_type -> ListingTypeEnum,
371 interface_language -> Varchar,
372 show_avatars -> Bool,
373 send_notifications_to_email -> Bool,
374 validator_time -> Timestamp,
376 show_bot_accounts -> Bool,
377 show_read_posts -> Bool,
378 show_new_post_notifs -> Bool,
379 email_verified -> Bool,
380 accepted_application -> Bool,
381 totp_2fa_secret -> Nullable<Text>,
382 totp_2fa_url -> Nullable<Text>,
387 local_user_language (id) {
389 local_user_id -> Int4,
397 mod_person_id -> Int4,
398 other_person_id -> Int4,
405 mod_add_community (id) {
407 mod_person_id -> Int4,
408 other_person_id -> Int4,
409 community_id -> Int4,
418 mod_person_id -> Int4,
419 other_person_id -> Int4,
420 reason -> Nullable<Text>,
422 expires -> Nullable<Timestamp>,
428 mod_ban_from_community (id) {
430 mod_person_id -> Int4,
431 other_person_id -> Int4,
432 community_id -> Int4,
433 reason -> Nullable<Text>,
435 expires -> Nullable<Timestamp>,
441 mod_feature_post (id) {
443 mod_person_id -> Int4,
447 is_featured_community -> Bool,
452 mod_hide_community (id) {
454 community_id -> Int4,
455 mod_person_id -> Int4,
457 reason -> Nullable<Text>,
465 mod_person_id -> Int4,
473 mod_remove_comment (id) {
475 mod_person_id -> Int4,
477 reason -> Nullable<Text>,
484 mod_remove_community (id) {
486 mod_person_id -> Int4,
487 community_id -> Int4,
488 reason -> Nullable<Text>,
490 expires -> Nullable<Timestamp>,
496 mod_remove_post (id) {
498 mod_person_id -> Int4,
500 reason -> Nullable<Text>,
507 mod_transfer_community (id) {
509 mod_person_id -> Int4,
510 other_person_id -> Int4,
511 community_id -> Int4,
517 password_reset_request (id) {
519 token_encrypted -> Text,
520 published -> Timestamp,
521 local_user_id -> Int4,
529 display_name -> Nullable<Varchar>,
530 avatar -> Nullable<Text>,
532 published -> Timestamp,
533 updated -> Nullable<Timestamp>,
535 bio -> Nullable<Text>,
537 private_key -> Nullable<Text>,
539 last_refreshed_at -> Timestamp,
540 banner -> Nullable<Text>,
542 inbox_url -> Varchar,
543 shared_inbox_url -> Nullable<Varchar>,
544 matrix_user_id -> Nullable<Text>,
547 ban_expires -> Nullable<Timestamp>,
553 person_aggregates (id) {
558 comment_count -> Int8,
559 comment_score -> Int8,
567 published -> Timestamp,
576 published -> Timestamp,
581 person_follower (id) {
585 published -> Timestamp,
591 person_mention (id) {
593 recipient_id -> Int4,
596 published -> Timestamp,
601 person_post_aggregates (id) {
605 read_comments -> Int8,
606 published -> Timestamp,
614 url -> Nullable<Text>,
615 body -> Nullable<Text>,
617 community_id -> Int4,
620 published -> Timestamp,
621 updated -> Nullable<Timestamp>,
624 embed_title -> Nullable<Text>,
625 embed_description -> Nullable<Text>,
626 thumbnail_url -> Nullable<Text>,
629 embed_video_url -> Nullable<Text>,
631 featured_community -> Bool,
632 featured_local -> Bool,
637 post_aggregates (id) {
644 published -> Timestamp,
645 newest_comment_time_necro -> Timestamp,
646 newest_comment_time -> Timestamp,
647 featured_community -> Bool,
648 featured_local -> Bool,
658 published -> Timestamp,
667 published -> Timestamp,
676 original_post_name -> Varchar,
677 original_post_url -> Nullable<Text>,
678 original_post_body -> Nullable<Text>,
681 resolver_id -> Nullable<Int4>,
682 published -> Timestamp,
683 updated -> Nullable<Timestamp>,
692 published -> Timestamp,
697 private_message (id) {
700 recipient_id -> Int4,
704 published -> Timestamp,
705 updated -> Nullable<Timestamp>,
712 private_message_report (id) {
715 private_message_id -> Int4,
716 original_pm_text -> Text,
719 resolver_id -> Nullable<Int4>,
720 published -> Timestamp,
721 updated -> Nullable<Timestamp>,
726 registration_application (id) {
728 local_user_id -> Int4,
730 admin_id -> Nullable<Int4>,
731 deny_reason -> Nullable<Text>,
732 published -> Timestamp,
739 jwt_secret -> Varchar,
747 sidebar -> Nullable<Text>,
748 published -> Timestamp,
749 updated -> Nullable<Timestamp>,
750 icon -> Nullable<Text>,
751 banner -> Nullable<Text>,
752 description -> Nullable<Varchar>,
754 last_refreshed_at -> Timestamp,
755 inbox_url -> Varchar,
756 private_key -> Nullable<Text>,
763 site_aggregates (id) {
770 users_active_day -> Int8,
771 users_active_week -> Int8,
772 users_active_month -> Int8,
773 users_active_half_year -> Int8,
788 local_site_id -> Int4,
790 published -> Timestamp,
791 updated -> Nullable<Timestamp>,
795 diesel::joinable!(admin_purge_comment -> person (admin_person_id));
796 diesel::joinable!(admin_purge_comment -> post (post_id));
797 diesel::joinable!(admin_purge_community -> person (admin_person_id));
798 diesel::joinable!(admin_purge_person -> person (admin_person_id));
799 diesel::joinable!(admin_purge_post -> community (community_id));
800 diesel::joinable!(admin_purge_post -> person (admin_person_id));
801 diesel::joinable!(comment -> language (language_id));
802 diesel::joinable!(comment -> person (creator_id));
803 diesel::joinable!(comment -> post (post_id));
804 diesel::joinable!(comment_aggregates -> comment (comment_id));
805 diesel::joinable!(comment_like -> comment (comment_id));
806 diesel::joinable!(comment_like -> person (person_id));
807 diesel::joinable!(comment_like -> post (post_id));
808 diesel::joinable!(comment_reply -> comment (comment_id));
809 diesel::joinable!(comment_reply -> person (recipient_id));
810 diesel::joinable!(comment_report -> comment (comment_id));
811 diesel::joinable!(comment_saved -> comment (comment_id));
812 diesel::joinable!(comment_saved -> person (person_id));
813 diesel::joinable!(community -> instance (instance_id));
814 diesel::joinable!(community_aggregates -> community (community_id));
815 diesel::joinable!(community_block -> community (community_id));
816 diesel::joinable!(community_block -> person (person_id));
817 diesel::joinable!(community_follower -> community (community_id));
818 diesel::joinable!(community_follower -> person (person_id));
819 diesel::joinable!(community_language -> community (community_id));
820 diesel::joinable!(community_language -> language (language_id));
821 diesel::joinable!(community_moderator -> community (community_id));
822 diesel::joinable!(community_moderator -> person (person_id));
823 diesel::joinable!(community_person_ban -> community (community_id));
824 diesel::joinable!(community_person_ban -> person (person_id));
825 diesel::joinable!(custom_emoji -> local_site (local_site_id));
826 diesel::joinable!(custom_emoji_keyword -> custom_emoji (custom_emoji_id));
827 diesel::joinable!(email_verification -> local_user (local_user_id));
828 diesel::joinable!(federation_allowlist -> instance (instance_id));
829 diesel::joinable!(federation_blocklist -> instance (instance_id));
830 diesel::joinable!(local_site -> site (site_id));
831 diesel::joinable!(local_site_rate_limit -> local_site (local_site_id));
832 diesel::joinable!(local_user -> person (person_id));
833 diesel::joinable!(local_user_language -> language (language_id));
834 diesel::joinable!(local_user_language -> local_user (local_user_id));
835 diesel::joinable!(mod_add_community -> community (community_id));
836 diesel::joinable!(mod_ban_from_community -> community (community_id));
837 diesel::joinable!(mod_feature_post -> person (mod_person_id));
838 diesel::joinable!(mod_feature_post -> post (post_id));
839 diesel::joinable!(mod_hide_community -> community (community_id));
840 diesel::joinable!(mod_hide_community -> person (mod_person_id));
841 diesel::joinable!(mod_lock_post -> person (mod_person_id));
842 diesel::joinable!(mod_lock_post -> post (post_id));
843 diesel::joinable!(mod_remove_comment -> comment (comment_id));
844 diesel::joinable!(mod_remove_comment -> person (mod_person_id));
845 diesel::joinable!(mod_remove_community -> community (community_id));
846 diesel::joinable!(mod_remove_community -> person (mod_person_id));
847 diesel::joinable!(mod_remove_post -> person (mod_person_id));
848 diesel::joinable!(mod_remove_post -> post (post_id));
849 diesel::joinable!(mod_transfer_community -> community (community_id));
850 diesel::joinable!(password_reset_request -> local_user (local_user_id));
851 diesel::joinable!(person -> instance (instance_id));
852 diesel::joinable!(person_aggregates -> person (person_id));
853 diesel::joinable!(person_ban -> person (person_id));
854 diesel::joinable!(person_mention -> comment (comment_id));
855 diesel::joinable!(person_mention -> person (recipient_id));
856 diesel::joinable!(person_post_aggregates -> person (person_id));
857 diesel::joinable!(person_post_aggregates -> post (post_id));
858 diesel::joinable!(post -> community (community_id));
859 diesel::joinable!(post -> language (language_id));
860 diesel::joinable!(post -> person (creator_id));
861 diesel::joinable!(post_aggregates -> post (post_id));
862 diesel::joinable!(post_like -> person (person_id));
863 diesel::joinable!(post_like -> post (post_id));
864 diesel::joinable!(post_read -> person (person_id));
865 diesel::joinable!(post_read -> post (post_id));
866 diesel::joinable!(post_report -> post (post_id));
867 diesel::joinable!(post_saved -> person (person_id));
868 diesel::joinable!(post_saved -> post (post_id));
869 diesel::joinable!(private_message_report -> private_message (private_message_id));
870 diesel::joinable!(registration_application -> local_user (local_user_id));
871 diesel::joinable!(registration_application -> person (admin_id));
872 diesel::joinable!(site -> instance (instance_id));
873 diesel::joinable!(site_aggregates -> site (site_id));
874 diesel::joinable!(site_language -> language (language_id));
875 diesel::joinable!(site_language -> site (site_id));
876 diesel::joinable!(tagline -> local_site (local_site_id));
878 diesel::allow_tables_to_appear_in_same_query!(
881 admin_purge_community,
891 community_aggregates,
896 community_person_ban,
898 custom_emoji_keyword,
900 federation_allowlist,
901 federation_blocklist,
905 local_site_rate_limit,
911 mod_ban_from_community,
916 mod_remove_community,
918 mod_transfer_community,
919 password_reset_request,
926 person_post_aggregates,
934 private_message_report,
935 registration_application,