Skip to content

Commit

Permalink
Create user.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingjux authored May 5, 2024
1 parent 784b656 commit b731004
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions lib/database/user.js
Original file line number Diff line number Diff line change
@@ -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
};

0 comments on commit b731004

Please sign in to comment.