Files
NodeJS-Video-Streamer/API/post.model.js
Johnathon Slightham 83c4742037 Initial Push
2020-12-20 22:46:29 -05:00

35 lines
493 B
JavaScript

/*
NodeJS-Video-Streamer - post.model.js
*/
// Schema for a video post
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
let Post = new Schema({
title: {
type: String
},
description: {
type: String
},
comments: {
type: Array
},
transcoding: {
type: Boolean
},
progress: {
type: Number
},
eta:{
type: String
},
likes:{
type: Number
},
},{
collection: 'posts'
});
module.exports = mongoose.model('Post', Post);