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

export interface IBorrowerDataBootCollateral {
  description: string;
  assessedValue: number;
}

export interface IBorrowerDataBootCollateralDoc extends IBorrowerDataBootCollateral, Document {
}

export const BorrowerDataBottCollateralSchema = new mongoose.Schema(
  {
    description: {
      type: String,
      required: true,
    },
    assessedValue: {
      type: Number,
    },
  },
  { timestamps: false, versionKey: false },
);

export const BorrowerDataBootCollateralModel: mongoose.Model<IBorrowerDataBootCollateralDoc> = mongoose.model<IBorrowerDataBootCollateralDoc>(MODEL_NAMES.borrowerDataBootCollaterals, BorrowerDataBottCollateralSchema);
