import { Document, Schema, model } from 'mongoose';

export interface CustomerPortalInterface extends Document {
  key: string,
  username: string,
  userID: string,
  emailAddress: string,
  expiresOn: Date,
  used?: boolean,
}

const CustomerPortal: Schema = new Schema({
  key: String,
  username: String,
  userID: String,
  emailAddress: String,
  expiresOn: Date,
  used: Boolean,
});

export default model<CustomerPortalInterface>('CustomerPortal', CustomerPortal);
