personal_website/models/mediaModel.js
2023-08-10 15:05:50 +02:00

15 lines
371 B
JavaScript

var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var mediaSchema = new Schema({
'title': String,
'released': String,
'webImg': String,
'code': String
});
module.exports = {
MovieModel: mongoose.model('movie', mediaSchema),
SeriesModel: mongoose.model('series', mediaSchema),
GameModel: mongoose.model('game', mediaSchema)
};