-- Schema: bird__movie_platform
CREATE SCHEMA IF NOT EXISTS "bird__movie_platform";

-- Table: lists
CREATE TABLE "bird__movie_platform"."lists" (
    "user_id" BIGINT,
    "list_id" BIGINT NOT NULL,
    "list_title" TEXT,
    "list_movie_number" BIGINT,
    "list_update_timestamp_utc" TEXT,
    "list_creation_timestamp_utc" TEXT,
    "list_followers" BIGINT,
    "list_url" TEXT,
    "list_comments" BIGINT,
    "list_description" TEXT,
    "list_cover_image_url" TEXT,
    "list_first_image_url" TEXT,
    "list_second_image_url" TEXT,
    "list_third_image_url" TEXT,
    CONSTRAINT "lists_pkey" PRIMARY KEY ("list_id")
);

-- Table: lists_users
CREATE TABLE "bird__movie_platform"."lists_users" (
    "user_id" BIGINT NOT NULL,
    "list_id" BIGINT NOT NULL,
    "list_update_date_utc" TEXT,
    "list_creation_date_utc" TEXT,
    "user_trialist" BIGINT,
    "user_subscriber" BIGINT,
    "user_avatar_image_url" TEXT,
    "user_cover_image_url" TEXT,
    "user_eligible_for_trial" TEXT,
    "user_has_payment_method" TEXT,
    CONSTRAINT "lists_users_pkey" PRIMARY KEY ("user_id", "list_id")
);

-- Table: movies
CREATE TABLE "bird__movie_platform"."movies" (
    "movie_id" BIGINT NOT NULL,
    "movie_title" TEXT,
    "movie_release_year" BIGINT,
    "movie_url" TEXT,
    "movie_title_language" TEXT,
    "movie_popularity" BIGINT,
    "movie_image_url" TEXT,
    "director_id" TEXT,
    "director_name" TEXT,
    "director_url" TEXT,
    CONSTRAINT "movies_pkey" PRIMARY KEY ("movie_id")
);

-- Table: ratings
CREATE TABLE "bird__movie_platform"."ratings" (
    "movie_id" BIGINT,
    "rating_id" BIGINT,
    "rating_url" TEXT,
    "rating_score" BIGINT,
    "rating_timestamp_utc" TEXT,
    "critic" TEXT,
    "critic_likes" BIGINT,
    "critic_comments" BIGINT,
    "user_id" BIGINT,
    "user_trialist" BIGINT,
    "user_subscriber" BIGINT,
    "user_eligible_for_trial" BIGINT,
    "user_has_payment_method" BIGINT
);

-- Table: ratings_users
CREATE TABLE "bird__movie_platform"."ratings_users" (
    "user_id" BIGINT,
    "rating_date_utc" TEXT,
    "user_trialist" BIGINT,
    "user_subscriber" BIGINT,
    "user_avatar_image_url" TEXT,
    "user_cover_image_url" TEXT,
    "user_eligible_for_trial" BIGINT,
    "user_has_payment_method" BIGINT
);
