2022-12-13 16:45:22 +03:00
|
|
|
|
|
|
|
CREATE TABLE films (
|
|
|
|
id INTEGER NOT NULL,
|
|
|
|
ru_title VARCHAR(256),
|
|
|
|
orig_title VARCHAR(255),
|
|
|
|
imdb_id VARCHAR(255),
|
|
|
|
kinopoisk_id INTEGER,
|
|
|
|
posterUrl VARCHAR(1500),
|
|
|
|
posterUrlPreview VARCHAR(1500),
|
|
|
|
countries JSON,
|
|
|
|
genres JSON,
|
|
|
|
year INTEGER,
|
|
|
|
description VARCHAR(20000),
|
|
|
|
ratingKinopoisk INTEGER,
|
|
|
|
ratingImdb INTEGER,
|
|
|
|
iframe_src VARCHAR(2000),
|
|
|
|
ratingImdbVoteCount INTEGER,
|
|
|
|
ratingKinopoiskVoteCount INTEGER,
|
2023-05-02 11:02:06 +03:00
|
|
|
created VARCHAR(1000),
|
|
|
|
content_type VARCHAR(25),
|
|
|
|
ratingAgeLimits VARCHAR(25),
|
2022-12-13 16:45:22 +03:00
|
|
|
media JSON,
|
|
|
|
PRIMARY KEY(id)
|
2023-01-07 14:19:53 +03:00
|
|
|
);
|
2023-03-15 22:44:31 +03:00
|
|
|
|
2023-05-02 11:02:06 +03:00
|
|
|
|
|
|
|
|
2023-03-15 22:44:31 +03:00
|
|
|
CREATE TABLE users (
|
2023-04-14 17:35:25 +03:00
|
|
|
id SERIAL,
|
|
|
|
login TEXT not NULL,
|
|
|
|
email TEXT NOT NULL,
|
|
|
|
password TEXT NOT NULL,
|
|
|
|
avatar_url TEXT,
|
2023-03-15 22:44:31 +03:00
|
|
|
permisionLVL INTEGER NOT NULL,
|
2023-04-14 17:35:25 +03:00
|
|
|
SaveItem INTEGER Array,
|
|
|
|
LaterItem INTEGER Array,
|
|
|
|
WantItem INTEGER Array,
|
2023-03-15 22:44:31 +03:00
|
|
|
PRIMARY KEY(id)
|
|
|
|
);
|
2023-04-14 17:35:25 +03:00
|
|
|
|
2023-05-02 11:02:06 +03:00
|
|
|
CREATE TABLE Siries (
|
|
|
|
id INTEGER NOT NULL,
|
|
|
|
ru_title VARCHAR(256),
|
|
|
|
orig_title VARCHAR(255),
|
|
|
|
imdb_id VARCHAR(255),
|
|
|
|
kinopoisk_id INTEGER,
|
|
|
|
posterUrl VARCHAR(1500),
|
|
|
|
posterUrlPreview VARCHAR(1500),
|
|
|
|
countries JSON,
|
|
|
|
genres JSON,
|
|
|
|
year INTEGER,
|
|
|
|
description VARCHAR(20000),
|
|
|
|
ratingKinopoisk INTEGER,
|
|
|
|
ratingImdb INTEGER,
|
|
|
|
iframe_src VARCHAR(2000),
|
|
|
|
ratingImdbVoteCount INTEGER,
|
|
|
|
ratingKinopoiskVoteCount INTEGER,
|
|
|
|
created VARCHAR(1000),
|
|
|
|
content_type VARCHAR(25),
|
|
|
|
ratingAgeLimits VARCHAR(25),
|
|
|
|
translation JSON,
|
|
|
|
episodes JSON,
|
|
|
|
PRIMARY KEY(id)
|
|
|
|
);
|
2023-04-14 17:35:25 +03:00
|
|
|
CREATE TABLE tokens (
|
2023-05-02 11:02:06 +03:00
|
|
|
login TEXT NOT NULL,
|
|
|
|
refreshToken TEXT NOT NULL,
|
|
|
|
PRIMARY KEY(login)
|
2023-04-14 17:35:25 +03:00
|
|
|
);
|