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,
|
|
|
|
},
|
2024-07-30 15:01:48 +00:00
|
|
|
sessionId: {
|
2024-07-30 11:26:42 +00:00
|
|
|
type: String,
|
|
|
|
required: true,
|
2024-08-09 13:39:04 +00:00
|
|
|
},
|
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
|