feat(Countries): Adding countries endpoint
This commit is contained in:
26
lib/Models/news.model.js
Normal file
26
lib/Models/news.model.js
Normal file
@@ -0,0 +1,26 @@
|
||||
const mongoose = require('mongoose');
|
||||
const { Schema } = mongoose;
|
||||
|
||||
const attachFile = new Schema({
|
||||
file:{ type: String },
|
||||
originalname:{ type: String },
|
||||
mimetype:{ type: String },
|
||||
focus_point:[{
|
||||
thumbnail:{ type: String, default:"main" },
|
||||
x:{ type: Number },
|
||||
y:{ type: Number },
|
||||
w:{ type: Number },
|
||||
h:{ type: Number },
|
||||
s:{ type: Number }
|
||||
}]
|
||||
});
|
||||
|
||||
const schema = new Schema({
|
||||
title : { type: String, required: true },
|
||||
description : { type: String, required: true },
|
||||
link_text : { type: String, required: true },
|
||||
link_url : { type: String, required: true },
|
||||
news_image: attachFile,
|
||||
});
|
||||
|
||||
module.exports = mongoose.model( "news", schema );
|
||||
Reference in New Issue
Block a user