From 38b37d474c1f22609189c5267ac20fbae4176631 Mon Sep 17 00:00:00 2001 From: Guillaume Vagner <guillaume.vagner@supelec.fr> Date: Thu, 21 Feb 2019 00:51:35 +0100 Subject: [PATCH] ignore node_modules --- .gitignore | 1 + models/Channel.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 models/Channel.js diff --git a/.gitignore b/.gitignore index 1bf4259..215737b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ config.js +node_modules \ No newline at end of file diff --git a/models/Channel.js b/models/Channel.js new file mode 100644 index 0000000..e2f569b --- /dev/null +++ b/models/Channel.js @@ -0,0 +1,14 @@ +const mongoose = require('../mongoose'); + +const channelSchema = new mongoose.Schema({ + token: String, + refresh: String, + expiration: Date, + username: String, + chatId: Number, + state: String, + groups: [Number], + scheduleTime: { type: String, validate: /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/ } +}) + +module.exports = mongoose.model('Channel', channelSchema); \ No newline at end of file -- GitLab