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

export interface ExecutiveOrderInterface extends Document {
  issuer: string;
  subject: string;
  body: string;
  at: number;
  oID: string;
  msg: string;
}

const ExecutiveOrder = new Schema({
  issuer: { type: String, required: true },
  subject: { type: String, required: true },
  body: { type: String, required: true },
  at: { type: Number, required: true },
  oID: { type: String, required: true, unique: true },
  msg: { type: String, required: true, unique: true },
});

export default model<ExecutiveOrderInterface>('ExecutiveOrders', ExecutiveOrder);
