discord-multipurpose-bot/models/Trade.js

13 lines
431 B
JavaScript
Raw Normal View History

2024-10-26 03:40:13 +01:00
const mongoose = require("mongoose");
const tradeSchema = new mongoose.Schema({
from: { type: String, required: true },
to: { type: String, required: true },
itemId: { type: String, required: true },
quantity: { type: Number, required: true },
coins: { type: Number, required: true },
createdAt: { type: Date, default: Date.now, expires: "1d" },
});
module.exports = mongoose.model("Trade", tradeSchema);