Create Tag tables and Add Tag endpoint
This commit is contained in:
@@ -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,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user