Normalize to double quotes across all files with Prettier
This commit is contained in:
1 parent
73bff72cec
commit
a5659cf4c8
190 files changed
+9523
-8859
No files matched your search
@@ -1,22 +1,24 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const Collection = sequelize.define("userCollection",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
tmdbId: { type: DataTypes.STRING(30), field: 'tmdb_id' },
|
||||
imdbId: { type: DataTypes.STRING(30), field: 'imdb_id' },
|
||||
tvdbId: { type: DataTypes.STRING(30), field: 'tvdb_id' },
|
||||
const Collection = sequelize.define("userCollection", {
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
tmdbId: { type: DataTypes.STRING(30), field: "tmdb_id" },
|
||||
imdbId: { type: DataTypes.STRING(30), field: "imdb_id" },
|
||||
tvdbId: { type: DataTypes.STRING(30), field: "tvdb_id" },
|
||||
|
||||
name: { type: DataTypes.STRING(150) },
|
||||
description: { type: DataTypes.STRING(3000) },
|
||||
isUserCollection: { type: DataTypes.BOOLEAN, defaultValue: false, field: 'is_user_collection' },
|
||||
userRating: { type: DataTypes.FLOAT, field: 'user_rating' },
|
||||
name: { type: DataTypes.STRING(150) },
|
||||
description: { type: DataTypes.STRING(3000) },
|
||||
isUserCollection: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
defaultValue: false,
|
||||
field: "is_user_collection",
|
||||
},
|
||||
userRating: { type: DataTypes.FLOAT, field: "user_rating" },
|
||||
|
||||
posterPath: { type: DataTypes.STRING(200), field: 'poster_path' },
|
||||
backdropPath: { type: DataTypes.STRING(200), field: 'backdrop_path' },
|
||||
isLocal: { type: DataTypes.BOOLEAN, defaultValue: false, field: 'is_local' }
|
||||
}
|
||||
);
|
||||
posterPath: { type: DataTypes.STRING(200), field: "poster_path" },
|
||||
backdropPath: { type: DataTypes.STRING(200), field: "backdrop_path" },
|
||||
isLocal: { type: DataTypes.BOOLEAN, defaultValue: false, field: "is_local" },
|
||||
});
|
||||
|
||||
module.exports = Collection;
|
||||
module.exports = Collection;
|
||||
+20
-18
@@ -1,26 +1,28 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const Credit = sequelize.define("credits",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
const Credit = sequelize.define("credits", {
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
|
||||
tmdb_credit_id: { type: DataTypes.STRING(100) },
|
||||
tmdb_credit_id: { type: DataTypes.STRING(100) },
|
||||
|
||||
adult: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
profile_path: { type: DataTypes.STRING(200), field: 'profile_path' },
|
||||
adult: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
profile_path: { type: DataTypes.STRING(200), field: "profile_path" },
|
||||
|
||||
character: { type: DataTypes.STRING(500) },
|
||||
order: { type: DataTypes.INTEGER },
|
||||
episode_count: { type: DataTypes.INTEGER, defaultValue: null },
|
||||
character: { type: DataTypes.STRING(500) },
|
||||
order: { type: DataTypes.INTEGER },
|
||||
episode_count: { type: DataTypes.INTEGER, defaultValue: null },
|
||||
|
||||
cast_type: { type: DataTypes.ENUM('cast', 'crew'), field: 'cast_type', defaultValue: 'cast' },
|
||||
department: { type: DataTypes.STRING(100) },
|
||||
job: { type: DataTypes.STRING(500) },
|
||||
cast_type: {
|
||||
type: DataTypes.ENUM("cast", "crew"),
|
||||
field: "cast_type",
|
||||
defaultValue: "cast",
|
||||
},
|
||||
department: { type: DataTypes.STRING(100) },
|
||||
job: { type: DataTypes.STRING(500) },
|
||||
|
||||
entry_id: { type: DataTypes.INTEGER, field: 'entry_id' },
|
||||
people_id: { type: DataTypes.INTEGER, field: 'people_id' },
|
||||
}
|
||||
);
|
||||
entry_id: { type: DataTypes.INTEGER, field: "entry_id" },
|
||||
people_id: { type: DataTypes.INTEGER, field: "people_id" },
|
||||
});
|
||||
|
||||
module.exports = Credit;
|
||||
@@ -1,29 +1,32 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const EntryGenre = sequelize.define('entryGenre',
|
||||
const EntryGenre = sequelize.define(
|
||||
"entryGenre",
|
||||
{
|
||||
genre_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
references: {
|
||||
model: 'Genres',
|
||||
key: 'id'
|
||||
}
|
||||
model: "Genres",
|
||||
key: "id",
|
||||
},
|
||||
},
|
||||
entry_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
references: {
|
||||
model: 'Entries',
|
||||
key: 'id'
|
||||
}
|
||||
}
|
||||
model: "Entries",
|
||||
key: "id",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
primaryKey: ['genre_id', 'entry_id'],
|
||||
}, {
|
||||
timestamps: false,
|
||||
});
|
||||
primaryKey: ["genre_id", "entry_id"],
|
||||
},
|
||||
{
|
||||
timestamps: false,
|
||||
},
|
||||
);
|
||||
|
||||
module.exports = EntryGenre;
|
||||
module.exports = EntryGenre;
|
||||
+12
-10
@@ -1,22 +1,24 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const EntryId = sequelize.define("entryId",
|
||||
const EntryId = sequelize.define(
|
||||
"entryId",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
entry_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: 'Entries',
|
||||
key: 'id'
|
||||
}
|
||||
model: "Entries",
|
||||
key: "id",
|
||||
},
|
||||
},
|
||||
tmdb_id: { type: DataTypes.STRING(30) },
|
||||
imdb_id: { type: DataTypes.STRING(30) },
|
||||
tvdb_id: { type: DataTypes.STRING(30) },
|
||||
}, {
|
||||
timestamps: false,
|
||||
}
|
||||
},
|
||||
{
|
||||
timestamps: false,
|
||||
},
|
||||
);
|
||||
|
||||
module.exports = EntryId;
|
||||
module.exports = EntryId;
|
||||
@@ -1,31 +1,32 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const EntryNetwork = sequelize.define('entryNetwork',
|
||||
const EntryNetwork = sequelize.define(
|
||||
"entryNetwork",
|
||||
{
|
||||
network_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
references: {
|
||||
model: 'Networks',
|
||||
key: 'id'
|
||||
}
|
||||
model: "Networks",
|
||||
key: "id",
|
||||
},
|
||||
},
|
||||
entry_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
references: {
|
||||
model: 'Entries',
|
||||
key: 'id'
|
||||
}
|
||||
model: "Entries",
|
||||
key: "id",
|
||||
},
|
||||
},
|
||||
order: {
|
||||
type: DataTypes.INTEGER
|
||||
}
|
||||
type: DataTypes.INTEGER,
|
||||
},
|
||||
},
|
||||
{
|
||||
primaryKey: ['network_id', 'entry_id'],
|
||||
}
|
||||
primaryKey: ["network_id", "entry_id"],
|
||||
},
|
||||
);
|
||||
|
||||
module.exports = EntryNetwork;
|
||||
module.exports = EntryNetwork;
|
||||
@@ -1,24 +1,25 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
|
||||
const EntryRating = sequelize.define("entryRating",
|
||||
const EntryRating = sequelize.define(
|
||||
"entryRating",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
entry_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: 'Entries',
|
||||
key: 'id'
|
||||
}
|
||||
model: "Entries",
|
||||
key: "id",
|
||||
},
|
||||
},
|
||||
user_rating: { type: DataTypes.FLOAT },
|
||||
tmdb_rating: { type: DataTypes.FLOAT },
|
||||
imdb_rating: { type: DataTypes.FLOAT },
|
||||
rotten_tomatoes_rating: { type: DataTypes.FLOAT },
|
||||
}, {
|
||||
timestamps: false,
|
||||
}
|
||||
},
|
||||
{
|
||||
timestamps: false,
|
||||
},
|
||||
);
|
||||
|
||||
module.exports = EntryRating;
|
||||
module.exports = EntryRating;
|
||||
+13
-13
@@ -1,29 +1,29 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
|
||||
const EntrySeen = sequelize.define("entrySeen",
|
||||
const EntrySeen = sequelize.define(
|
||||
"entrySeen",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
|
||||
entry_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: 'Entries',
|
||||
key: 'id'
|
||||
}
|
||||
model: "Entries",
|
||||
key: "id",
|
||||
},
|
||||
},
|
||||
|
||||
date_seen: { type: DataTypes.DATE },
|
||||
seen_with: { type: DataTypes.STRING(50) },
|
||||
accuracy: {
|
||||
type: DataTypes.ENUM('EXACT', 'ESTIMATED', 'UNKNOWN'),
|
||||
defaultValue: 'EXACT',
|
||||
type: DataTypes.ENUM("EXACT", "ESTIMATED", "UNKNOWN"),
|
||||
defaultValue: "EXACT",
|
||||
},
|
||||
|
||||
}, {
|
||||
timestamps: false,
|
||||
}
|
||||
},
|
||||
{
|
||||
timestamps: false,
|
||||
},
|
||||
);
|
||||
|
||||
module.exports = EntrySeen;
|
||||
+26
-29
@@ -1,38 +1,35 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const Episode = sequelize.define("episode",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
const Episode = sequelize.define("episode", {
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
|
||||
tmdb_id: { type: DataTypes.STRING(30) },
|
||||
imdb_id: { type: DataTypes.STRING(30) },
|
||||
tvdb_id: { type: DataTypes.STRING(30) },
|
||||
tmdb_id: { type: DataTypes.STRING(30) },
|
||||
imdb_id: { type: DataTypes.STRING(30) },
|
||||
tvdb_id: { type: DataTypes.STRING(30) },
|
||||
|
||||
season_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: 'Seasons',
|
||||
key: 'id'
|
||||
}
|
||||
season_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: "Seasons",
|
||||
key: "id",
|
||||
},
|
||||
},
|
||||
|
||||
name: { type: DataTypes.STRING(500) },
|
||||
overview: { type: DataTypes.STRING(3000) },
|
||||
episode_number: { type: DataTypes.INTEGER },
|
||||
episode_type: { type: DataTypes.STRING(60) },
|
||||
runtime: { type: DataTypes.INTEGER },
|
||||
air_date: { type: DataTypes.DATE },
|
||||
name: { type: DataTypes.STRING(500) },
|
||||
overview: { type: DataTypes.STRING(3000) },
|
||||
episode_number: { type: DataTypes.INTEGER },
|
||||
episode_type: { type: DataTypes.STRING(60) },
|
||||
runtime: { type: DataTypes.INTEGER },
|
||||
air_date: { type: DataTypes.DATE },
|
||||
|
||||
user_rating: { type: DataTypes.FLOAT },
|
||||
tmdb_rating: { type: DataTypes.FLOAT },
|
||||
user_rating: { type: DataTypes.FLOAT },
|
||||
tmdb_rating: { type: DataTypes.FLOAT },
|
||||
|
||||
still_path: { type: DataTypes.STRING(200) },
|
||||
still_path: { type: DataTypes.STRING(200) },
|
||||
|
||||
date_first_seen: { type: DataTypes.DATEONLY },
|
||||
date_last_seen: { type: DataTypes.DATEONLY }
|
||||
date_first_seen: { type: DataTypes.DATEONLY },
|
||||
date_last_seen: { type: DataTypes.DATEONLY },
|
||||
});
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
module.exports = Episode;
|
||||
module.exports = Episode;
|
||||
@@ -1,34 +1,30 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const EpisodeSeen = sequelize.define("episodeSeen", {
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
|
||||
const EpisodeSeen = sequelize.define("episodeSeen",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
|
||||
entry_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: 'Entries',
|
||||
key: 'id'
|
||||
}
|
||||
entry_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: "Entries",
|
||||
key: "id",
|
||||
},
|
||||
episode_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: 'Episodes',
|
||||
key: 'id'
|
||||
}
|
||||
},
|
||||
episode_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: "Episodes",
|
||||
key: "id",
|
||||
},
|
||||
},
|
||||
|
||||
date_seen: { type: DataTypes.DATE },
|
||||
seen_with: { type: DataTypes.STRING(50) },
|
||||
accuracy: {
|
||||
type: DataTypes.ENUM('EXACT', 'ESTIMATED', 'UNKNOWN'),
|
||||
defaultValue: 'EXACT',
|
||||
},
|
||||
|
||||
}
|
||||
);
|
||||
date_seen: { type: DataTypes.DATE },
|
||||
seen_with: { type: DataTypes.STRING(50) },
|
||||
accuracy: {
|
||||
type: DataTypes.ENUM("EXACT", "ESTIMATED", "UNKNOWN"),
|
||||
defaultValue: "EXACT",
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = EpisodeSeen;
|
||||
@@ -1,15 +1,17 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const Franchise = sequelize.define("franchise",
|
||||
const Franchise = sequelize.define(
|
||||
"franchise",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
title: { type: DataTypes.STRING(50) },
|
||||
overview: { type: DataTypes.STRING(300) },
|
||||
user_rating: { type: DataTypes.FLOAT }
|
||||
}, {
|
||||
timestamps: false,
|
||||
}
|
||||
user_rating: { type: DataTypes.FLOAT },
|
||||
},
|
||||
{
|
||||
timestamps: false,
|
||||
},
|
||||
);
|
||||
|
||||
module.exports = Franchise;
|
||||
module.exports = Franchise;
|
||||
@@ -1,14 +1,16 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const Genre = sequelize.define("genre",
|
||||
const Genre = sequelize.define(
|
||||
"genre",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true },
|
||||
|
||||
name: { type: DataTypes.STRING(30) },
|
||||
}, {
|
||||
timestamps: false,
|
||||
}
|
||||
},
|
||||
{
|
||||
timestamps: false,
|
||||
},
|
||||
);
|
||||
|
||||
module.exports = Genre;
|
||||
module.exports = Genre;
|
||||
+26
-16
@@ -1,21 +1,31 @@
|
||||
const { DataTypes, Sequelize } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes, Sequelize } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const Media = sequelize.define("media",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
const Media = sequelize.define("media", {
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
|
||||
mediaable: { type: Sequelize.STRING },
|
||||
mediaableId: { type: Sequelize.INTEGER, field: 'mediaable_id' },
|
||||
mediaable: { type: Sequelize.STRING },
|
||||
mediaableId: { type: Sequelize.INTEGER, field: "mediaable_id" },
|
||||
|
||||
type: { type: DataTypes.STRING(50) },
|
||||
path: { type: DataTypes.STRING(200) },
|
||||
type: { type: DataTypes.STRING(50) },
|
||||
path: { type: DataTypes.STRING(200) },
|
||||
|
||||
isLocal: { type: DataTypes.BOOLEAN, field: 'is_local' },
|
||||
isSelected: { type: DataTypes.BOOLEAN, field: 'is_selected', defaultValue: false },
|
||||
isCustom: { type: DataTypes.BOOLEAN, field: 'is_custom', defaultValue: false },
|
||||
isFavorit: { type: DataTypes.BOOLEAN, field: 'is_favorit', defaultValue: false },
|
||||
}
|
||||
);
|
||||
isLocal: { type: DataTypes.BOOLEAN, field: "is_local" },
|
||||
isSelected: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
field: "is_selected",
|
||||
defaultValue: false,
|
||||
},
|
||||
isCustom: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
field: "is_custom",
|
||||
defaultValue: false,
|
||||
},
|
||||
isFavorit: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
field: "is_favorit",
|
||||
defaultValue: false,
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = Media;
|
||||
module.exports = Media;
|
||||
+12
-14
@@ -1,18 +1,16 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const Network = sequelize.define("network",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true },
|
||||
const Network = sequelize.define("network", {
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true },
|
||||
|
||||
name: { type: DataTypes.STRING(30) },
|
||||
originCountry: { type: DataTypes.STRING(100), field: 'origin_country' },
|
||||
homepage: { type: DataTypes.STRING(100), field: 'homepage' },
|
||||
name: { type: DataTypes.STRING(30) },
|
||||
originCountry: { type: DataTypes.STRING(100), field: "origin_country" },
|
||||
homepage: { type: DataTypes.STRING(100), field: "homepage" },
|
||||
|
||||
logoPath: { type: DataTypes.STRING(200), field: 'logo_path' },
|
||||
posterPath: { type: DataTypes.STRING(200), field: 'poster_path' },
|
||||
backdropPath: { type: DataTypes.STRING(200), field: 'backdrop_path' },
|
||||
}
|
||||
);
|
||||
logoPath: { type: DataTypes.STRING(200), field: "logo_path" },
|
||||
posterPath: { type: DataTypes.STRING(200), field: "poster_path" },
|
||||
backdropPath: { type: DataTypes.STRING(200), field: "backdrop_path" },
|
||||
});
|
||||
|
||||
module.exports = Network;
|
||||
module.exports = Network;
|
||||
+26
-25
@@ -1,35 +1,36 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const People = sequelize.define("peoples",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
const People = sequelize.define("peoples", {
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
|
||||
tmdb_id: { type: DataTypes.STRING(100) },
|
||||
tmdb_id: { type: DataTypes.STRING(100) },
|
||||
|
||||
name: { type: DataTypes.STRING(100) },
|
||||
birthday: { type: DataTypes.DATEONLY },
|
||||
deathday: { type: DataTypes.DATEONLY, allowNull: true },
|
||||
gender: { type: DataTypes.INTEGER },
|
||||
name: { type: DataTypes.STRING(100) },
|
||||
birthday: { type: DataTypes.DATEONLY },
|
||||
deathday: { type: DataTypes.DATEONLY, allowNull: true },
|
||||
gender: { type: DataTypes.INTEGER },
|
||||
|
||||
biography: { type: DataTypes.TEXT },
|
||||
place_of_birth: { type: DataTypes.STRING(100), field: 'place_of_birth' },
|
||||
biography: { type: DataTypes.TEXT },
|
||||
place_of_birth: { type: DataTypes.STRING(100), field: "place_of_birth" },
|
||||
|
||||
adult: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
popularity: { type: DataTypes.FLOAT },
|
||||
adult: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
popularity: { type: DataTypes.FLOAT },
|
||||
|
||||
known_for_department: { type: DataTypes.STRING(50), field: 'known_for_department' },
|
||||
homepage: { type: DataTypes.STRING(200), allowNull: true },
|
||||
known_for_department: {
|
||||
type: DataTypes.STRING(50),
|
||||
field: "known_for_department",
|
||||
},
|
||||
homepage: { type: DataTypes.STRING(200), allowNull: true },
|
||||
|
||||
imdb_id: { type: DataTypes.STRING(20), field: 'imdb_id' },
|
||||
profile_path: { type: DataTypes.STRING(200), field: 'profile_path' },
|
||||
imdb_id: { type: DataTypes.STRING(20), field: "imdb_id" },
|
||||
profile_path: { type: DataTypes.STRING(200), field: "profile_path" },
|
||||
|
||||
last_fetch: { type: DataTypes.DATEONLY, field: 'last_fetch' },
|
||||
profile_update: { type: DataTypes.DATEONLY, field: 'profile_update' },
|
||||
fully_fetched: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
favorite: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
pinned: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
}
|
||||
);
|
||||
last_fetch: { type: DataTypes.DATEONLY, field: "last_fetch" },
|
||||
profile_update: { type: DataTypes.DATEONLY, field: "profile_update" },
|
||||
fully_fetched: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
favorite: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
pinned: { type: DataTypes.BOOLEAN, defaultValue: false },
|
||||
});
|
||||
|
||||
module.exports = People;
|
||||
+24
-26
@@ -1,34 +1,32 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const Season = sequelize.define("season",
|
||||
{
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
const Season = sequelize.define("season", {
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
|
||||
tmdb_id: { type: DataTypes.STRING(30) },
|
||||
imdb_id: { type: DataTypes.STRING(30) },
|
||||
tmdb_id: { type: DataTypes.STRING(30) },
|
||||
imdb_id: { type: DataTypes.STRING(30) },
|
||||
|
||||
entry_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: 'Entries',
|
||||
key: 'id'
|
||||
}
|
||||
entry_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: "Entries",
|
||||
key: "id",
|
||||
},
|
||||
},
|
||||
|
||||
name: { type: DataTypes.STRING(500) },
|
||||
overview: { type: DataTypes.STRING(3000) },
|
||||
season_number: { type: DataTypes.INTEGER },
|
||||
episode_count: { type: DataTypes.INTEGER },
|
||||
air_date: { type: DataTypes.DATE },
|
||||
name: { type: DataTypes.STRING(500) },
|
||||
overview: { type: DataTypes.STRING(3000) },
|
||||
season_number: { type: DataTypes.INTEGER },
|
||||
episode_count: { type: DataTypes.INTEGER },
|
||||
air_date: { type: DataTypes.DATE },
|
||||
|
||||
user_rating: { type: DataTypes.FLOAT },
|
||||
tmdb_rating: { type: DataTypes.FLOAT },
|
||||
imdb_rating: { type: DataTypes.FLOAT },
|
||||
user_rating: { type: DataTypes.FLOAT },
|
||||
tmdb_rating: { type: DataTypes.FLOAT },
|
||||
imdb_rating: { type: DataTypes.FLOAT },
|
||||
|
||||
poster_path: { type: DataTypes.STRING(200) },
|
||||
banner_path: { type: DataTypes.STRING(200) },
|
||||
}
|
||||
);
|
||||
poster_path: { type: DataTypes.STRING(200) },
|
||||
banner_path: { type: DataTypes.STRING(200) },
|
||||
});
|
||||
|
||||
module.exports = Season;
|
||||
module.exports = Season;
|
||||
@@ -1,30 +1,32 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../config/database');
|
||||
const { DataTypes } = require("sequelize");
|
||||
const sequelize = require("../config/database");
|
||||
|
||||
const UserCollectionEntry = sequelize.define('userCollectionEntry',
|
||||
const UserCollectionEntry = sequelize.define(
|
||||
"userCollectionEntry",
|
||||
{
|
||||
user_collection_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
references: {
|
||||
model: 'UserCollections',
|
||||
key: 'id'
|
||||
}
|
||||
model: "UserCollections",
|
||||
key: "id",
|
||||
},
|
||||
},
|
||||
entry_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
primaryKey: true,
|
||||
references: {
|
||||
model: 'Entries',
|
||||
key: 'id'
|
||||
}
|
||||
model: "Entries",
|
||||
key: "id",
|
||||
},
|
||||
},
|
||||
order: {
|
||||
type: DataTypes.INTEGER
|
||||
}
|
||||
type: DataTypes.INTEGER,
|
||||
},
|
||||
},
|
||||
{
|
||||
primaryKey: ['user_collection_id', 'entry_id'],
|
||||
});
|
||||
primaryKey: ["user_collection_id", "entry_id"],
|
||||
},
|
||||
);
|
||||
|
||||
module.exports = UserCollectionEntry;
|
||||
module.exports = UserCollectionEntry;
|
||||
Reference in new issue
Block a user