LicenseKey.js 386 B

12345678910111213141516171819
  1. const mongoose = require('mongoose');
  2. const licenseKeySchema = new mongoose.Schema({
  3. licenseKey: {
  4. type: String,
  5. required: true,
  6. unique: true
  7. },
  8. isUsed: {
  9. type: Boolean,
  10. default: false
  11. },
  12. generatedAt: {
  13. type: Date,
  14. default: Date.now
  15. }
  16. });
  17. module.exports = mongoose.model('LicenseKey', licenseKeySchema);