// @generated automatically by Diesel CLI. diesel::table! { couples (id) { id -> Int4, family_id -> Int4, wife -> Nullable, husband -> Nullable, #[max_length = 1] state -> Nullable, photo_id -> Nullable, time_create -> Int8, time_update -> Int8, wedding_year -> Nullable, wedding_month -> Nullable, wedding_day -> Nullable, divorce_year -> Nullable, divorce_month -> Nullable, divorce_day -> Nullable, } } diesel::table! { families (id) { id -> Int4, time_create -> Int8, #[max_length = 30] name -> Varchar, #[max_length = 7] invitation_code -> Varchar, disable_couple_photos -> Bool, enable_genealogy -> Bool, } } diesel::table! { members (id) { id -> Int4, family_id -> Int4, #[max_length = 30] first_name -> Nullable, #[max_length = 30] last_name -> Nullable, #[max_length = 30] birth_last_name -> Nullable, photo_id -> Nullable, #[max_length = 255] email -> Nullable, #[max_length = 30] phone -> Nullable, #[max_length = 155] address -> Nullable, #[max_length = 150] city -> Nullable, #[max_length = 12] postal_code -> Nullable, #[max_length = 2] country -> Nullable, #[max_length = 1] sex -> Nullable, time_create -> Int8, time_update -> Int8, mother -> Nullable, father -> Nullable, birth_year -> Nullable, birth_month -> Nullable, birth_day -> Nullable, dead -> Bool, death_year -> Nullable, death_month -> Nullable, death_day -> Nullable, note -> Nullable, } } diesel::table! { memberships (user_id, family_id) { user_id -> Int4, family_id -> Int4, time_create -> Int8, is_admin -> Bool, } } diesel::table! { photos (id) { id -> Int4, #[max_length = 36] file_id -> Varchar, time_create -> Int8, #[max_length = 150] mime_type -> Varchar, #[max_length = 130] sha512 -> Varchar, file_size -> Int4, #[max_length = 130] thumb_sha512 -> Varchar, } } diesel::table! { users (id) { id -> Int4, #[max_length = 30] name -> Varchar, #[max_length = 255] email -> Varchar, password -> Nullable, time_create -> Int8, #[max_length = 150] reset_password_token -> Nullable, time_gen_reset_token -> Int8, #[max_length = 150] delete_account_token -> Nullable, time_gen_delete_account_token -> Int8, time_activate -> Int8, active -> Bool, admin -> Bool, } } diesel::joinable!(couples -> families (family_id)); diesel::joinable!(couples -> photos (photo_id)); diesel::joinable!(members -> families (family_id)); diesel::joinable!(members -> photos (photo_id)); diesel::joinable!(memberships -> families (family_id)); diesel::joinable!(memberships -> users (user_id)); diesel::allow_tables_to_appear_in_same_query!( couples, families, members, memberships, photos, users, );