2022-05-12 10:39:05 +02:00

18 lines
391 B
JavaScript

import mongoose, { Schema } from "mongoose"
function getSchemas() {
const obj = Object()
const _schemas = require("../schemas")
Object.keys(_schemas).forEach((key) => {
obj[key] = Schema(_schemas[key])
})
return obj
}
const schemas = getSchemas()
// streaming
export const StreamingKey = mongoose.model("StreamingKey", schemas.streamingKey, "streamingKeys")