ghostguild-org/server/models/boardChannel.js

11 lines
389 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 })
boardChannelSchema.index({ slackChannelId: 1 }, { unique: true })
export default mongoose.models.BoardChannel || mongoose.model('BoardChannel', boardChannelSchema)