personal_website/models/mediaModel.ts
2024-07-16 15:06:58 +02:00

14 lines
380 B
TypeScript

import mongoose, { Schema } from 'mongoose';
const mediaSchema = new Schema({
'title': String,
'released': String,
'webImg': String,
'code': String
});
const MovieModel = mongoose.model('movie', mediaSchema);
const SeriesModel = mongoose.model('series', mediaSchema);
const GameModel = mongoose.model('game', mediaSchema);
export { MovieModel, SeriesModel, GameModel };