settings/models/API_Usage.js

52 lines
915 B
JavaScript
Raw Normal View History

2024-07-30 11:26:42 +00:00
const mongoose = require('../db/connect')
const { Schema } = mongoose
const apiUsage = new Schema({
companyId: {
type: String,
required: true,
},
callerId: {
type: String,
required: true,
},
sessionId: {
2024-07-30 11:26:42 +00:00
type: String,
required: true,
},
2024-07-30 11:26:42 +00:00
provider: {
type: String,
required: true,
},
product: {
type: String,
required: true,
},
usage: {
type: String,
required: true
},
price: {
type: String,
required: true
},
billingBy: {
type: String,
required: true,
},
billingUnit: {
type: Number,
required: true
},
total_cost: {
type: String,
required: true
}
}, { timestamps: true })
const API_Usage = mongoose.model('API_Usage', apiUsage)
module.exports = API_Usage