feat: add Tag, TagSuggestion, Connection models and extend Member schema
Adds three new Mongoose models for the community connections feature. Extends Member with craftTags, communityConnections block, privacy fields for both, and a connectionRequests notification preference.
This commit is contained in:
parent
4aacb26c4b
commit
8112e5ea47
4 changed files with 72 additions and 0 deletions
|
|
@ -90,6 +90,21 @@ const memberSchema = new mongoose.Schema({
|
|||
slackDMChannelId: String, // DM channel ID for direct messaging
|
||||
},
|
||||
|
||||
craftTags: [String],
|
||||
communityConnections: {
|
||||
topics: [
|
||||
{
|
||||
tagSlug: String,
|
||||
state: { type: String, enum: ['help', 'interested', 'seeking'] },
|
||||
},
|
||||
],
|
||||
offerPeerSupport: { type: Boolean, default: false },
|
||||
availability: String,
|
||||
slackHandle: String,
|
||||
personalMessage: String,
|
||||
details: String,
|
||||
},
|
||||
|
||||
// Privacy settings for profile fields
|
||||
privacy: {
|
||||
pronouns: {
|
||||
|
|
@ -137,12 +152,23 @@ const memberSchema = new mongoose.Schema({
|
|||
enum: ["public", "members", "private"],
|
||||
default: "members",
|
||||
},
|
||||
craftTags: {
|
||||
type: String,
|
||||
enum: ["public", "members", "private"],
|
||||
default: "members",
|
||||
},
|
||||
communityConnections: {
|
||||
type: String,
|
||||
enum: ["public", "members", "private"],
|
||||
default: "members",
|
||||
},
|
||||
},
|
||||
|
||||
notifications: {
|
||||
events: { type: Boolean, default: true },
|
||||
updates: { type: Boolean, default: true },
|
||||
peerRequests: { type: Boolean, default: true },
|
||||
connectionRequests: { type: Boolean, default: true },
|
||||
},
|
||||
|
||||
inviteEmailSent: { type: Boolean, default: false },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue