billingRecordModel.js

 avatar
unknown
plain_text
a year ago
734 B
3
Indexable
const mongoose = require('mongoose');

const billingRecordSchema = new mongoose.Schema({
    description: {
        type: String,
        required: [true, 'Please provide description of the billing']
    },
    agentName: {
        type: String,
        required: [true , 'Please provide agent name'],
    },
    creationDate: {
        type: Date,
        required: true,
        default: Date.now
    },
    amount: {
        type: Number,
        required: [true , 'Please provide amount']
    },
    status: {
        type: String,
        required: [true, 'Please provide status']
    }
}) 

const BillingRecord  = mongoose.model('BillingRecord', billingRecordSchema);

module.exports = BillingRecord;
Editor is loading...
Leave a Comment