• This project
    • Loading...
  • Sign in

황선혁 / weather_chatbot

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • weather_chatbot
  • server
  • models
  • chatModel.js
  • Eric Whale's avatar
    Re-Organize folder structure (server) · fae2a128
    fae2a128
    Eric Whale authored 2022-06-02 14:01:04 +0900
chatModel.js 339 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
const mongoose = require("mongoose");

const chatSchema = mongoose.Schema({
  room: {
    type: mongoose.Schema.Types.ObjectId,
    require: true,
    ref: "Chatroom",
  },
  conversation: [
    {
      message: {
        type: String,
        required: true,
      },
    },
  ],
});

module.exports = mongoose.model("Chat", chatSchema);