const mongoose = require("mongoose");
const {mongooseConstantValues} = require('../apps/common/systemConstents')
const Schema = mongoose.Schema

const DiscountCodeSchema = mongoose.Schema({
    id: {
      type: Number
    },
    [mongooseConstantValues.USAGE_COUNT]: {
      type: String,
      required: true
    },
    [mongooseConstantValues.DISCOUNT_CODE]: {
      type: String,
    },
    [mongooseConstantValues.PRICE_RULE_ID]: {
      type: String,
    },
    [mongooseConstantValues.IS_ACTIVE]: {
      type: Boolean,
    },
    [mongooseConstantValues.CREATED_ON]:{
      type: Date,
      required: true
    },
    [mongooseConstantValues.UPDATED_ON]:{
      type: Date,
      required: true
    }
  });
  
  module.exports = mongoose.model("DiscountCode", DiscountCodeSchema);