Added Location and location ownership/rights to gamenight.
This commit is contained in:
@@ -31,6 +31,7 @@ diesel::table! {
|
||||
name -> Varchar,
|
||||
datetime -> Timestamptz,
|
||||
owner_id -> Uuid,
|
||||
location_id -> Nullable<Uuid>,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +49,22 @@ diesel::table! {
|
||||
}
|
||||
}
|
||||
|
||||
diesel::table! {
|
||||
location (id) {
|
||||
id -> Uuid,
|
||||
name -> Varchar,
|
||||
address -> Nullable<Varchar>,
|
||||
note -> Nullable<Varchar>,
|
||||
}
|
||||
}
|
||||
|
||||
diesel::table! {
|
||||
location_owner (location_id, user_id) {
|
||||
location_id -> Uuid,
|
||||
user_id -> Uuid,
|
||||
}
|
||||
}
|
||||
|
||||
diesel::table! {
|
||||
owned_game (user_id, game_id) {
|
||||
user_id -> Uuid,
|
||||
@@ -73,10 +90,13 @@ diesel::table! {
|
||||
}
|
||||
|
||||
diesel::joinable!(gamenight -> client (owner_id));
|
||||
diesel::joinable!(gamenight -> location (location_id));
|
||||
diesel::joinable!(gamenight_gamelist -> game (game_id));
|
||||
diesel::joinable!(gamenight_gamelist -> gamenight (gamenight_id));
|
||||
diesel::joinable!(gamenight_participant -> client (user_id));
|
||||
diesel::joinable!(gamenight_participant -> gamenight (gamenight_id));
|
||||
diesel::joinable!(location_owner -> client (user_id));
|
||||
diesel::joinable!(location_owner -> location (location_id));
|
||||
diesel::joinable!(owned_game -> client (user_id));
|
||||
diesel::joinable!(owned_game -> game (game_id));
|
||||
diesel::joinable!(pwd -> client (user_id));
|
||||
@@ -87,6 +107,8 @@ diesel::allow_tables_to_appear_in_same_query!(
|
||||
gamenight,
|
||||
gamenight_gamelist,
|
||||
gamenight_participant,
|
||||
location,
|
||||
location_owner,
|
||||
owned_game,
|
||||
pwd,
|
||||
registration_tokens,
|
||||
|
||||
Reference in New Issue
Block a user