- 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
9 lines
322 B
JavaScript
9 lines
322 B
JavaScript
import mongoose from 'mongoose'
|
|
|
|
const boardChannelSchema = new mongoose.Schema({
|
|
name: { type: String, required: true },
|
|
slackChannelId: { type: String, required: true },
|
|
tagSlugs: [String],
|
|
}, { timestamps: true })
|
|
|
|
export default mongoose.models.BoardChannel || mongoose.model('BoardChannel', boardChannelSchema)
|