-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3026640
commit 792f666
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Table users { | ||
user_id Long [pk, increment] // Primary key | ||
email String [not null, unique] | ||
login String [not null, unique] | ||
name String | ||
birthday Date | ||
} | ||
|
||
Table films { | ||
film_id Long [pk, increment] // Primary key | ||
name String [not null] | ||
description String [note: "Max length 200"] | ||
release_date Date | ||
duration Int [not null] | ||
genre_id Long [ref: > genres.genre_id] | ||
rating_id Long [ref: > ratings.rating_id] | ||
} | ||
|
||
Table genres { | ||
genre_id Long [pk, increment] // Primary key | ||
name String [not null] | ||
} | ||
|
||
Table ratings { | ||
rating_id Long [pk, increment] // Primary key | ||
name String [not null] | ||
} | ||
|
||
Table friends { | ||
user_id Long [ref: > users.user_id] | ||
friend_id Long [ref: > users.user_id] | ||
} | ||
|
||
Table likes { | ||
user_id Long [ref: > users.user_id] | ||
film_id Long [ref: > films.film_id] | ||
} | ||
|
||
Table unconfirmed_friends { | ||
user_id Long [ref: > users.user_id] | ||
friend_id Long [ref: > users.user_id] | ||
} |