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)
