feat(onboarding): add Member onboarding subdocument, Event tags, and WikiArticle model
This commit is contained in:
parent
3797ff7925
commit
9fe8d99808
3 changed files with 28 additions and 0 deletions
|
|
@ -182,6 +182,7 @@ const eventSchema = new mongoose.Schema({
|
|||
refundAmount: Number,
|
||||
},
|
||||
],
|
||||
tags: [{ type: String }],
|
||||
createdBy: { type: String, required: true },
|
||||
createdAt: { type: Date, default: Date.now },
|
||||
updatedAt: { type: Date, default: Date.now },
|
||||
|
|
|
|||
|
|
@ -152,6 +152,13 @@ const memberSchema = new mongoose.Schema({
|
|||
|
||||
memberNumber: { type: Number, unique: true, sparse: true },
|
||||
|
||||
onboarding: {
|
||||
completedAt: { type: Date, default: null },
|
||||
eventPageVisited: { type: Boolean, default: false },
|
||||
ecologyPageVisited: { type: Boolean, default: false },
|
||||
wikiClicked: { type: Boolean, default: false },
|
||||
},
|
||||
|
||||
createdAt: { type: Date, default: Date.now },
|
||||
lastLogin: Date,
|
||||
});
|
||||
|
|
|
|||
20
server/models/wikiArticle.js
Normal file
20
server/models/wikiArticle.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import mongoose from "mongoose";
|
||||
|
||||
const wikiArticleSchema = new mongoose.Schema(
|
||||
{
|
||||
outlineId: { type: String, unique: true, required: true },
|
||||
title: { type: String, required: true },
|
||||
collection: String,
|
||||
url: { type: String, required: true },
|
||||
summary: String,
|
||||
tags: [{ type: String }],
|
||||
publishedAt: Date,
|
||||
permission: String,
|
||||
lastSyncedAt: Date,
|
||||
outlineUpdatedAt: Date,
|
||||
},
|
||||
{ timestamps: true }
|
||||
);
|
||||
|
||||
export default mongoose.models.WikiArticle ||
|
||||
mongoose.model("WikiArticle", wikiArticleSchema);
|
||||
Loading…
Add table
Add a link
Reference in a new issue