akf-forum/models/Secret.js

10 lines
308 B
JavaScript
Raw Normal View History

2022-08-29 16:16:44 +03:00
const mongoose = require("mongoose")
2022-09-17 20:25:19 +03:00
const { limits } = require("../config.json");
2022-04-06 21:14:46 +03:00
2022-08-29 16:16:44 +03:00
const schema = new mongoose.Schema({
2022-09-17 20:25:19 +03:00
username: { type: String, unique: true, maxlength: limits.names },
2022-09-16 22:26:03 +03:00
password: String,
2022-08-29 16:16:44 +03:00
id: { type: String, unique: true }
});
2022-08-29 16:16:44 +03:00
module.exports = mongoose.model('secret', schema);