Files
Myrient-Search-Engine/lib/models/metadata.js
Alexandra 4367b5cdb7 it works and stuff.
todo improve search quality
improve metadata matching quality
2025-05-24 06:39:00 -06:00

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
}