Cantilever-Labs/models/Coupon.js

22 lines
383 B
JavaScript
Raw Normal View History

2021-05-12 02:16:11 -07:00
const mongoose = require("mongoose");
const CouponSchema = new mongoose.Schema({
couponCode: {
type: String,
required: true,
},
percentage: {
type: String,
required: true,
},
remainingTimes: {
type: Number,
required: true,
},
numAllowed: {
type: Number,
required: true,
},
});
2021-05-10 03:10:10 -07:00
2021-05-12 02:16:11 -07:00
module.exports = mongoose.model("Coupon", CouponSchema);