import mongoose, { Document } from 'mongoose';
import { MODEL_NAMES } from './_models';

export interface IBorrowerDataGuarantee {
  name: string;
  type: string;
}

export interface IBorrowerDataGuaranteeDoc extends IBorrowerDataGuarantee, Document {
}

export const BorrowerDataGuaranteeSchema = new mongoose.Schema(
  {
    name: {
      type: String,
      required: true,
    },
    typeOf: {
      type: String,
    },
  },
  { timestamps: false, versionKey: false },
);

export const BorrowerDataGuaranteeModel: mongoose.Model<IBorrowerDataGuaranteeDoc> = mongoose.model<IBorrowerDataGuaranteeDoc>(MODEL_NAMES.borrowerDataGuarantees, BorrowerDataGuaranteeSchema);
