add movies

This commit is contained in:
Dzejkobik007
2022-10-10 00:08:57 +02:00
parent a54bba9d28
commit 3d5f060b53
2 changed files with 89 additions and 0 deletions

View File

@@ -1,7 +1,94 @@
# Movies - json # Movies - json
# Movies - json
## Popis
Struktura souboru json pro import/export z/do database movies
### movie
- id
- name
- year
- country_id
### country
- id
- name
### movie_has_genre
- movie_id
- genre_id
### genre
- id
- name
## Rozbor
```mermaid
graph TD;
movie-->movie_has_genre;
movie_has_genre-->genre;
movie-->country;
```
## EXAMPLE:
```json
{
"movie": [
{
"id": 1,
"name": "Harry Potter a Fénixův řád",
"year": 2007,
"country_id": 2
},
{
"id": 2,
"name": "Hostitel",
"year": 2013,
"country_id": 1
}
],
"country": [
{
"id":1,
"name":"USA"
},
{
"id":2,
"name":"Velká Británie"
}
],
"movie_has_genre": [
{
"movie_id": 2,
"genre_id": 1
},
{
"movie_id": 2,
"genre_id": 2
},
{
"movie_id": 1,
"genre_id": 2
}
],
"genre": [
{
"id":1,
"name":"Thriller"
},
{
"id":2,
"name":"Fantazy"
}
]
}
```
## Popis ## Popis
Struktura souboru json pro import/export z/do database movies
### movie ### movie
- id - id
- name - name

View File

@@ -2,6 +2,8 @@
## Popis ## Popis
Struktura souboru yaml pro import/export z/do database movies
### movie ### movie
- id - id
- name - name