-
Notifications
You must be signed in to change notification settings - Fork 7
Case
Suresh KUMAR Mukhiya edited this page Oct 7, 2020
·
2 revisions
Schema(
{
name: {
type: String,
required: true,
},
description: {
type: String,
},
status: {
type: String,
required: true,
enum: ['ACTIVE', 'INACTIVE', 'DRAFT'],
},
featuredImage: [FileSchema],
modules: [
{
type: Schema.Types.ObjectId,
ref: 'module',
},
],
audience: {
type: String,
default: 'ALL',
enum: ['ALL', 'USER'],
},
audienceList: [String],
availableFrom: {
type: String,
required: true,
},
createdBy: {
type: Schema.Types.ObjectId,
ref: 'user',
},
updatedBy: {
type: Schema.Types.ObjectId,
ref: 'user',
},
importHash: { type: String },
},
{ timestamps: true },
);
Note, timestamps
automatically adds createdAt
and updatedAt
field.
Developed as open-source platform for Internet-Delivered Psychological Treatment Systems (IDPT)