Create Tag tables and Add Tag endpoint

This commit is contained in:
Cameron Cordes committed 2021-10-11 21:52:06 -04:00
1 parent 2d6db6d059
commit 8939ffbaf5
7 files changed
+155 -5

No files matched your search

+23 -1
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,
);