Initial Push
This commit is contained in:
35
API/post.model.js
Normal file
35
API/post.model.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
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);
|
||||
Reference in New Issue
Block a user