2024-09-06 13:27:00 +00:00
|
|
|
const mongoose = require("mongoose");
|
|
|
|
const Schema = mongoose.Schema;
|
|
|
|
|
|
|
|
const ConceptSchema = new Schema({
|
2024-09-14 00:10:05 +00:00
|
|
|
name: {type: String, required: true, default: "New Concept"},
|
|
|
|
type: { type: String, required: true, default: "Concept" },
|
|
|
|
info: { type: Object }, // For preview only
|
|
|
|
data: { type: Object }, // Advanced item
|
2024-09-11 18:03:09 +00:00
|
|
|
book: {type: mongoose.Types.ObjectId, ref: "Book"},
|
|
|
|
campaign: {type: mongoose.Types.ObjectId, ref: "Campaign"},
|
2024-09-06 13:27:00 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = mongoose.model('Concept', ConceptSchema);
|