Project Blue

Tables (8)

Actor (actors)

  • ID (id) — bigint — Primary key — NOT NULL
  • name — varchar(10) — NOT NULL
  • createdAt (created_at) — datetime — NOT NULL
  • modifiedAt (modified_at) — datetime — NOT NULL
  • country — enum — NOT NULL
  • birth — datetime — NOT NULL

Comment (comments)

  • ID (id) — bigint — Primary key — NOT NULL
  • userId (user_id) — bigint — Foreign key → User.ID — NOT NULL
  • reviewId (review_id) — bigint — Foreign key → Review.ID — NOT NULL
  • content — varchar(255) — NOT NULL
  • createdAt (created_at) — datetime — NOT NULL
  • modifiedAt (modified_at) — datetime — NOT NULL

Genre (genre)

  • ID (id) — bigint — Primary key — NOT NULL
  • name — varchar(10) — NOT NULL
  • createdAt (created_at) — datetime — NOT NULL
  • modifiedAt (modified_at) — datetime — NOT NULL

Media (media)

  • ID (id) — bigint — Primary key — NOT NULL
  • title — varchar(255) — NOT NULL
  • description — varchar(255) — NOT NULL
  • releaseDate (release_date) — datetime — NOT NULL
  • media_type — enum — NOT NULL
  • runtime — int — NOT NULL
  • country — enum — NOT NULL
  • ageRating (age_rating) — enum — NOT NULL
  • createdAt (created_at) — datetime — NOT NULL
  • modifiedAt (modified_at) — datetime — NOT NULL

Media - Genre (media_genres)

  • ID (id) — bigint — Primary key — NOT NULL
  • mediaId (media_id) — bigint — Foreign key → Media.ID — NOT NULL
  • genreId — bigint — Foreign key → Genre.ID — NOT NULL
  • createdAt (created_at) — datetime — NOT NULL
  • modifiedAt (modified_at) — datetime — NOT NULL

Review (reviews)

  • ID (id) — bigint — Primary key — NOT NULL
  • userId (user_id) — bigint — Foreign key → User.ID — NOT NULL
  • mediaId (media_id) — bigint — Foreign key → Media.ID — NOT NULL
  • rating — enum — NOT NULL
  • createdAt (created_at) — datetime — NOT NULL
  • modifiedAt (modified_at) — datetime — NOT NULL

User (users)

  • ID (id) — bigint — Primary key — NOT NULL
  • name — varchar(10) — NOT NULL
  • email — varchar(100) — NOT NULL
  • password — varchar(255) — NOT NULL
  • role — enum — NOT NULL
  • deletedAt (deleted_at) — bool — NOT NULL
  • createdAt (created_at) — datetime — NOT NULL
  • modifiedAt (modified_at) — datetime — NOT NULL

Watch Status (watch_statuses)

  • ID (id) — bigint — Primary key — NOT NULL
  • userId (user_id) — bigint — Foreign key → User.ID — NOT NULL
  • mediaId (media_id) — bigint — Foreign key → Media.ID — NOT NULL
  • status — enum — NOT NULL
  • createdAt (created_at) — datetime — NOT NULL
  • modifiedAt (modified_at) — datetime — NOT NULL