feat(board): add BoardPost + BoardChannel models and zod schemas
- Add BoardPost model (author, title, seeking/offering, note, tags) with validator requiring at least one of seeking/offering - Add BoardChannel model (name, slackChannelId, tagSlugs) - Add boardPost/boardChannel create+update Zod schemas - Trim Member.board subdoc to only slackHandle (drop topics, details, offerPeerSupport, availability, personalMessage) - Remove old boardUpdateSchema
This commit is contained in:
parent
19d519b153
commit
1da59021a3
4 changed files with 68 additions and 20 deletions
|
|
@ -73,17 +73,7 @@ const memberSchema = new mongoose.Schema({
|
|||
|
||||
craftTags: [String],
|
||||
board: {
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue