Files
menui_backend/models/users.js
2022-07-21 18:16:33 +02:00

36 lines
609 B
JavaScript

const mongoose = require("mongoose");
const userSchema = mongoose.Schema({
_id: mongoose.Types.ObjectId,
email: {
type: String,
required: true,
},
username: {
type: String,
maxlength: 64,
},
billing: {
NIP: {
type: String,
maxlength: 20,
},
adress: {
type: String,
maxlength: 128,
},
companyName: {
type: String,
maxlength: 64,
},
},
isRestaurant: {
type: Boolean,
required: true,
},
restaurants: [mongoose.Types.ObjectId],
trialUsed: Boolean,
});
module.exports = mongoose.model("User", userSchema);