settings/models/API_Pricing.js

41 lines
783 B
JavaScript
Raw Normal View History

2024-07-30 11:26:42 +00:00
const mongoose = require('../db/connect')
const { Schema } = mongoose
const apiPricing = new Schema({
provider: {
type: String,
required: true,
},
product: {
type: String,
required: true,
},
currency: {
type: String,
enum: ['dollar', 'real',],
default: 'dollar'
},
price: {
type: String,
required: true
},
2024-07-30 11:26:42 +00:00
billingBy:{
type: String,
enum: ['minute', 'character', 'token', 'second', 'hour'],
2024-07-30 11:26:42 +00:00
required: true,
},
billingUnit:{
type: Number,
required: true
},
type: {
type: String,
2024-07-30 11:26:42 +00:00
}
}, { timestamps: true })
const API_Pricing = mongoose.model('API_Pricing', apiPricing)
module.exports = API_Pricing