UNPKG

generator-aristos

Version:

create aristos cms fast with yeoman generator.

26 lines (25 loc) 472 B
const mongoose = require("mongoose"); const Schema = mongoose.Schema; /* Media Schema */ const MediaSchema = new Schema({ title: { type: String, required: true }, path: { type: String, required: true }, alt: { type: String, required: true }, category: { type: Schema.Types.ObjectId, ref: "MediaCategory" }, description: String, keywords: String, link: String }); module.exports = mongoose.model("Media", MediaSchema);