2023-05-24 13:52:24 +02:00
|
|
|
// @generated automatically by Diesel CLI.
|
|
|
|
|
2024-06-22 21:30:26 +00:00
|
|
|
diesel::table! {
|
|
|
|
accommodations_list (id) {
|
|
|
|
id -> Int4,
|
|
|
|
family_id -> Int4,
|
|
|
|
time_create -> Int8,
|
|
|
|
time_update -> Int8,
|
|
|
|
#[max_length = 50]
|
|
|
|
name -> Varchar,
|
|
|
|
need_validation -> Bool,
|
|
|
|
description -> Nullable<Text>,
|
|
|
|
#[max_length = 6]
|
|
|
|
color -> Nullable<Varchar>,
|
|
|
|
open_to_reservations -> Bool,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
|
|
|
accommodations_reservations (id) {
|
|
|
|
id -> Int4,
|
|
|
|
family_id -> Int4,
|
|
|
|
accommodation_id -> Int4,
|
|
|
|
user_id -> Int4,
|
|
|
|
time_create -> Int8,
|
|
|
|
time_update -> Int8,
|
|
|
|
reservation_start -> Int8,
|
|
|
|
reservation_end -> Int8,
|
|
|
|
validated -> Nullable<Bool>,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diesel::table! {
|
|
|
|
accommodations_reservations_cals_urls (id) {
|
|
|
|
id -> Int4,
|
|
|
|
family_id -> Int4,
|
|
|
|
accommodation_id -> Nullable<Int4>,
|
|
|
|
user_id -> Int4,
|
|
|
|
#[max_length = 50]
|
|
|
|
name -> Varchar,
|
|
|
|
#[max_length = 50]
|
|
|
|
token -> Varchar,
|
|
|
|
time_create -> Int8,
|
|
|
|
time_used -> Int8,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-03 18:30:29 +02:00
|
|
|
diesel::table! {
|
2023-08-07 16:50:22 +02:00
|
|
|
couples (id) {
|
|
|
|
id -> Int4,
|
|
|
|
family_id -> Int4,
|
|
|
|
wife -> Nullable<Int4>,
|
|
|
|
husband -> Nullable<Int4>,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 1]
|
2023-08-07 16:50:22 +02:00
|
|
|
state -> Nullable<Varchar>,
|
2023-08-05 19:15:52 +02:00
|
|
|
photo_id -> Nullable<Int4>,
|
2023-08-07 16:50:22 +02:00
|
|
|
time_create -> Int8,
|
|
|
|
time_update -> Int8,
|
2023-08-03 18:30:29 +02:00
|
|
|
wedding_year -> Nullable<Int2>,
|
|
|
|
wedding_month -> Nullable<Int2>,
|
|
|
|
wedding_day -> Nullable<Int2>,
|
|
|
|
divorce_year -> Nullable<Int2>,
|
|
|
|
divorce_month -> Nullable<Int2>,
|
|
|
|
divorce_day -> Nullable<Int2>,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-15 18:00:31 +02:00
|
|
|
diesel::table! {
|
|
|
|
families (id) {
|
|
|
|
id -> Int4,
|
|
|
|
time_create -> Int8,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 30]
|
2023-06-15 18:00:31 +02:00
|
|
|
name -> Varchar,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 7]
|
2023-06-15 18:00:31 +02:00
|
|
|
invitation_code -> Varchar,
|
2023-08-26 14:55:23 +00:00
|
|
|
disable_couple_photos -> Bool,
|
2024-05-16 19:15:15 +00:00
|
|
|
enable_genealogy -> Bool,
|
2024-06-22 21:30:26 +00:00
|
|
|
enable_accommodations -> Bool,
|
2023-06-15 18:00:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-03 18:30:29 +02:00
|
|
|
diesel::table! {
|
|
|
|
members (id) {
|
|
|
|
id -> Int4,
|
|
|
|
family_id -> Int4,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 30]
|
2023-08-03 18:30:29 +02:00
|
|
|
first_name -> Nullable<Varchar>,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 30]
|
2023-08-03 18:30:29 +02:00
|
|
|
last_name -> Nullable<Varchar>,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 30]
|
2023-08-03 18:30:29 +02:00
|
|
|
birth_last_name -> Nullable<Varchar>,
|
2023-08-05 19:15:52 +02:00
|
|
|
photo_id -> Nullable<Int4>,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 255]
|
2023-08-03 18:30:29 +02:00
|
|
|
email -> Nullable<Varchar>,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 30]
|
2023-08-03 18:30:29 +02:00
|
|
|
phone -> Nullable<Varchar>,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 155]
|
2023-08-03 18:30:29 +02:00
|
|
|
address -> Nullable<Varchar>,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 150]
|
2023-08-03 18:30:29 +02:00
|
|
|
city -> Nullable<Varchar>,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 12]
|
2023-08-03 18:30:29 +02:00
|
|
|
postal_code -> Nullable<Varchar>,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 2]
|
2023-08-03 18:30:29 +02:00
|
|
|
country -> Nullable<Varchar>,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 1]
|
2023-08-04 19:03:46 +02:00
|
|
|
sex -> Nullable<Varchar>,
|
2023-08-03 18:30:29 +02:00
|
|
|
time_create -> Int8,
|
|
|
|
time_update -> Int8,
|
|
|
|
mother -> Nullable<Int4>,
|
|
|
|
father -> Nullable<Int4>,
|
|
|
|
birth_year -> Nullable<Int2>,
|
|
|
|
birth_month -> Nullable<Int2>,
|
|
|
|
birth_day -> Nullable<Int2>,
|
2023-08-08 11:11:29 +02:00
|
|
|
dead -> Bool,
|
2023-08-03 18:30:29 +02:00
|
|
|
death_year -> Nullable<Int2>,
|
|
|
|
death_month -> Nullable<Int2>,
|
|
|
|
death_day -> Nullable<Int2>,
|
|
|
|
note -> Nullable<Text>,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-15 18:00:31 +02:00
|
|
|
diesel::table! {
|
|
|
|
memberships (user_id, family_id) {
|
|
|
|
user_id -> Int4,
|
|
|
|
family_id -> Int4,
|
|
|
|
time_create -> Int8,
|
|
|
|
is_admin -> Bool,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-05 19:15:52 +02:00
|
|
|
diesel::table! {
|
|
|
|
photos (id) {
|
|
|
|
id -> Int4,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 36]
|
2023-08-07 11:07:24 +02:00
|
|
|
file_id -> Varchar,
|
|
|
|
time_create -> Int8,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 150]
|
2023-08-05 19:15:52 +02:00
|
|
|
mime_type -> Varchar,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 130]
|
2023-08-05 19:15:52 +02:00
|
|
|
sha512 -> Varchar,
|
|
|
|
file_size -> Int4,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 130]
|
2023-08-05 19:15:52 +02:00
|
|
|
thumb_sha512 -> Varchar,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-24 13:52:24 +02:00
|
|
|
diesel::table! {
|
|
|
|
users (id) {
|
|
|
|
id -> Int4,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 30]
|
2023-05-24 14:38:18 +02:00
|
|
|
name -> Varchar,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 255]
|
2023-05-24 13:52:24 +02:00
|
|
|
email -> Varchar,
|
|
|
|
password -> Nullable<Varchar>,
|
|
|
|
time_create -> Int8,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 150]
|
2023-06-06 09:47:52 +02:00
|
|
|
reset_password_token -> Nullable<Varchar>,
|
2023-05-24 13:52:24 +02:00
|
|
|
time_gen_reset_token -> Int8,
|
2023-08-31 19:23:21 +02:00
|
|
|
#[max_length = 150]
|
2023-06-06 09:47:52 +02:00
|
|
|
delete_account_token -> Nullable<Varchar>,
|
|
|
|
time_gen_delete_account_token -> Int8,
|
2023-05-24 13:52:24 +02:00
|
|
|
time_activate -> Int8,
|
|
|
|
active -> Bool,
|
|
|
|
admin -> Bool,
|
|
|
|
}
|
|
|
|
}
|
2023-06-15 18:00:31 +02:00
|
|
|
|
2024-06-22 21:30:26 +00:00
|
|
|
diesel::joinable!(accommodations_list -> families (family_id));
|
|
|
|
diesel::joinable!(accommodations_reservations -> accommodations_list (accommodation_id));
|
|
|
|
diesel::joinable!(accommodations_reservations -> families (family_id));
|
|
|
|
diesel::joinable!(accommodations_reservations -> users (user_id));
|
|
|
|
diesel::joinable!(accommodations_reservations_cals_urls -> accommodations_list (accommodation_id));
|
|
|
|
diesel::joinable!(accommodations_reservations_cals_urls -> families (family_id));
|
|
|
|
diesel::joinable!(accommodations_reservations_cals_urls -> users (user_id));
|
2023-08-07 16:50:22 +02:00
|
|
|
diesel::joinable!(couples -> families (family_id));
|
2023-08-05 19:15:52 +02:00
|
|
|
diesel::joinable!(couples -> photos (photo_id));
|
2023-08-03 18:30:29 +02:00
|
|
|
diesel::joinable!(members -> families (family_id));
|
2023-08-05 19:15:52 +02:00
|
|
|
diesel::joinable!(members -> photos (photo_id));
|
2023-06-15 18:00:31 +02:00
|
|
|
diesel::joinable!(memberships -> families (family_id));
|
|
|
|
diesel::joinable!(memberships -> users (user_id));
|
|
|
|
|
2023-08-05 19:15:52 +02:00
|
|
|
diesel::allow_tables_to_appear_in_same_query!(
|
2024-06-22 21:30:26 +00:00
|
|
|
accommodations_list,
|
|
|
|
accommodations_reservations,
|
|
|
|
accommodations_reservations_cals_urls,
|
2023-08-05 19:15:52 +02:00
|
|
|
couples,
|
|
|
|
families,
|
|
|
|
members,
|
|
|
|
memberships,
|
|
|
|
photos,
|
|
|
|
users,
|
|
|
|
);
|