Room.js 411 Bytes
Newer Older
JeongYeonwoo's avatar
JeongYeonwoo committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import mongoose from 'mongoose'

const { String } = mongoose.Schema.Types

const RoomSchema = new mongoose.Schema({
    roomName: {
        type: String,
        required: true,
    },
    interest: {
        type: String,
        required: true,
    },
    isOpen:{
        type: String,

    },
    
}, {
    timestamps: true
})

export default mongoose.models.ChatSchema || mongoose.model('chat', ChatSchema)