From b731004a9d4bdb30009f5f0797116f3aaac9df6b Mon Sep 17 00:00:00 2001 From: Kingjux <154667110+Kingjux@users.noreply.github.com> Date: Sun, 5 May 2024 20:50:24 +0300 Subject: [PATCH] Create user.js --- lib/database/user.js | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 lib/database/user.js diff --git a/lib/database/user.js b/lib/database/user.js new file mode 100644 index 00000000..707748ec --- /dev/null +++ b/lib/database/user.js @@ -0,0 +1,36 @@ +let options = { + rank: Object, + default: {} + }; + const mongoose = require("mongoose"); + const UserSchema = new mongoose.Schema({ + id: { + type: String, + required: true, + unique: true + }, + name: { + type: String + }, + permit: { + type: String, + default: "false" + }, + times: { + type: Number, + default: 0 + }, + ban: { + type: String, + default: "false" + }, + warn: { + type: Object, + default: {} + }, + ...options + }); + const sck1 = mongoose.model("Sck1", UserSchema); + module.exports = { + sck1: sck1 + };