File size: 635 Bytes
683d9cb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | const mongoose = require('mongoose');
const DealSchema = new mongoose.Schema({
time: String,
deal: String,
symbol: String,
type: String,
direction: String,
volume: Number,
price: Number,
order: String,
commission: Number,
swap: Number,
profit: Number,
balance: Number,
comment: String,
});
const ReportSchema = new mongoose.Schema({
accountId: String,
uploadDate: { type: Date, default: Date.now },
deals: [DealSchema], // Stores the parsed table data
images: [String], // Stores paths/base64 of uploaded PNGs
});
module.exports = mongoose.model('Report', ReportSchema); |