const mongoose = require('mongoose'), Schema = mongoose.Schema; const schema = new Schema({ eventId: { type: String, require: true, index: true }, createdAt: { type: Number, require: true }, // UTC Unix epoch handledAt: { type: Number }, // UTC Unix epoch type: { type: String, require: true }, custId: { type: String }, // Stripe customer Id }); module.exports = mongoose.model('Sub_Event', schema);