billingRecordModel.js

mail@pastecode.io avatar
unknown
plain_text
2 months ago
734 B
1
Indexable
Never
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;
Leave a Comment