mirror of
https://github.com/alexankitty/Myrient-Search-Engine.git
synced 2026-01-15 16:33:15 -03:00
51 lines
1.2 KiB
JavaScript
51 lines
1.2 KiB
JavaScript
import { DataTypes } from "sequelize"
|
|
|
|
export default function (sequelize) {
|
|
const Metadata = sequelize.define('Metadata', {
|
|
id: {//these will match the igdbid to make things a little easier
|
|
type: DataTypes.INTEGER,
|
|
primaryKey: true,
|
|
},
|
|
title: {
|
|
type: DataTypes.STRING,
|
|
allowNull: false
|
|
},
|
|
alternatetitles: {
|
|
type: DataTypes.STRING
|
|
},
|
|
description: {
|
|
type: DataTypes.TEXT
|
|
},
|
|
rating: {
|
|
type: DataTypes.STRING
|
|
},
|
|
coverartid: {
|
|
type: DataTypes.STRING
|
|
},
|
|
releasedate: {
|
|
type: DataTypes.DATEONLY
|
|
},
|
|
genre: {
|
|
type: DataTypes.STRING
|
|
},
|
|
developers: {
|
|
type: DataTypes.STRING
|
|
},
|
|
publishers: {
|
|
type: DataTypes.STRING
|
|
},
|
|
gamemodes:{
|
|
type: DataTypes.STRING
|
|
},
|
|
platforms: {
|
|
type: DataTypes.STRING
|
|
}
|
|
}, {
|
|
indexes: [
|
|
{ fields: ['title'] },
|
|
{ fields: ['description'] },//If this slows down the db may want to not index this.
|
|
]
|
|
})
|
|
|
|
return Metadata
|
|
} |