Skip to content

Commit

Permalink
Create DBML diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderB777 authored Jul 22, 2024
1 parent 3026640 commit 792f666
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions DBML diagram
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]
}

0 comments on commit 792f666

Please sign in to comment.