Netflix Clone
Tables (6)
content
- content_id — BIGINT — Primary key — NOT NULL
- title — VARCHAR(200) — NOT NULL
- description — TEXT
- release_year — INT
- running_time — INT — NOT NULL
- poster_image_url — VARCHAR(500)
- view_count — INT — NOT NULL
- created_by — BIGINT — Foreign key → user.user_id — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
content_genre
- content_id — BIGINT — Foreign key → content.content_id — NOT NULL
- genre_id — BIGINT — Foreign key → genre.genre_id — NOT NULL
genre
- genre_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
user
- user_id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- nickname — VARCHAR(50) — NOT NULL
- role — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
watch_history
- watch_history_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- content_id — BIGINT — Foreign key → content.content_id — NOT NULL
- last_position — INT — NOT NULL
- is_completed — BOOLEAN — NOT NULL
- last_watched_at — DATETIME — NOT NULL
wishlist
- wishlist_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- content_id — BIGINT — Foreign key → content.content_id — NOT NULL
- created_at — DATETIME — NOT NULL