GeneIT/geneit_backend/src/schema.rs

86 lines
2.3 KiB
Rust

// @generated automatically by Diesel CLI.
diesel::table! {
couples (wife, husband) {
wife -> Int4,
husband -> Int4,
photo_id -> Nullable<Varchar>,
wedding_year -> Nullable<Int2>,
wedding_month -> Nullable<Int2>,
wedding_day -> Nullable<Int2>,
divorce_year -> Nullable<Int2>,
divorce_month -> Nullable<Int2>,
divorce_day -> Nullable<Int2>,
}
}
diesel::table! {
families (id) {
id -> Int4,
time_create -> Int8,
name -> Varchar,
invitation_code -> Varchar,
}
}
diesel::table! {
members (id) {
id -> Int4,
family_id -> Int4,
first_name -> Nullable<Varchar>,
last_name -> Nullable<Varchar>,
birth_last_name -> Nullable<Varchar>,
photo_id -> Nullable<Varchar>,
email -> Nullable<Varchar>,
phone -> Nullable<Varchar>,
address -> Nullable<Varchar>,
city -> Nullable<Varchar>,
postal_code -> Nullable<Varchar>,
country -> Nullable<Varchar>,
sex -> Nullable<Varchar>,
time_create -> Int8,
time_update -> Int8,
mother -> Nullable<Int4>,
father -> Nullable<Int4>,
birth_year -> Nullable<Int2>,
birth_month -> Nullable<Int2>,
birth_day -> Nullable<Int2>,
death_year -> Nullable<Int2>,
death_month -> Nullable<Int2>,
death_day -> Nullable<Int2>,
note -> Nullable<Text>,
}
}
diesel::table! {
memberships (user_id, family_id) {
user_id -> Int4,
family_id -> Int4,
time_create -> Int8,
is_admin -> Bool,
}
}
diesel::table! {
users (id) {
id -> Int4,
name -> Varchar,
email -> Varchar,
password -> Nullable<Varchar>,
time_create -> Int8,
reset_password_token -> Nullable<Varchar>,
time_gen_reset_token -> Int8,
delete_account_token -> Nullable<Varchar>,
time_gen_delete_account_token -> Int8,
time_activate -> Int8,
active -> Bool,
admin -> Bool,
}
}
diesel::joinable!(members -> families (family_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, users,);