diff --git a/models/cashTransactionModel.js b/models/cashTransactionModel.js deleted file mode 100644 index 7d63553..0000000 --- a/models/cashTransactionModel.js +++ /dev/null @@ -1,14 +0,0 @@ -var mongoose = require('mongoose'); -var Schema = mongoose.Schema; - -var cashTransaction = new Schema({ - 'raw': String, - 'day': Number, - 'month': Number, - 'year': Number, - 'amount': Number, - 'type': Number, - 'company': String, -}); - -module.exports = mongoose.model('cashTransaction', cashTransaction); diff --git a/models/cashTransactionModel.ts b/models/cashTransactionModel.ts new file mode 100644 index 0000000..e71ca90 --- /dev/null +++ b/models/cashTransactionModel.ts @@ -0,0 +1,15 @@ +import mongoose, { Schema } from 'mongoose'; + +const cashTransaction = new Schema({ + 'raw': String, + 'day': Number, + 'month': Number, + 'year': Number, + 'amount': Number, + 'type': Number, + 'company': String, +}); + +const CashTransaction = mongoose.model('cashTransaction', cashTransaction); + +export default CashTransaction; diff --git a/models/mediaModel.js b/models/mediaModel.js deleted file mode 100644 index 18121ce..0000000 --- a/models/mediaModel.js +++ /dev/null @@ -1,15 +0,0 @@ -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) -}; \ No newline at end of file diff --git a/models/mediaModel.ts b/models/mediaModel.ts new file mode 100644 index 0000000..b284c4b --- /dev/null +++ b/models/mediaModel.ts @@ -0,0 +1,14 @@ +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 }; \ No newline at end of file