Create Tag tables and Add Tag endpoint

This commit is contained in:
Cameron Cordes
2021-09-03 19:34:38 -04:00
parent 2d6db6d059
commit 8939ffbaf5
7 changed files with 155 additions and 5 deletions

View File

@@ -6,6 +6,21 @@ table! {
}
}
table! {
tagged_photo (id) {
id -> Integer,
photo_name -> Text,
tag_id -> Integer,
}
}
table! {
tags (id) {
id -> Integer,
name -> Text,
}
}
table! {
users (id) {
id -> Integer,
@@ -14,4 +29,11 @@ table! {
}
}
allow_tables_to_appear_in_same_query!(favorites, users,);
joinable!(tagged_photo -> tags (tag_id));
allow_tables_to_appear_in_same_query!(
favorites,
tagged_photo,
tags,
users,
);