some changes
This commit is contained in:
13
models/reports.js
Normal file
13
models/reports.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
const mongoose = require("mongoose");
|
||||||
|
|
||||||
|
const reportSchema = mongoose.Schema({
|
||||||
|
_id: mongoose.Types.ObjectId,
|
||||||
|
date: Date,
|
||||||
|
users: Number,
|
||||||
|
restaurants: Number,
|
||||||
|
subscriptionsActive: Number,
|
||||||
|
subscriptionsCancelled: Number,
|
||||||
|
invoicesSent: Number
|
||||||
|
});
|
||||||
|
|
||||||
|
module.exorts = mongoose.model("Report", reportSchema);
|
||||||
@@ -64,6 +64,7 @@ const restaurantSchema = mongoose.Schema({
|
|||||||
subscriptionActive: Boolean,
|
subscriptionActive: Boolean,
|
||||||
subscriptionStarted: Date,
|
subscriptionStarted: Date,
|
||||||
subscriptionDue: Date,
|
subscriptionDue: Date,
|
||||||
|
indexed: Date,
|
||||||
categories: [String],
|
categories: [String],
|
||||||
lunchHours: String,
|
lunchHours: String,
|
||||||
lunchMenu: [
|
lunchMenu: [
|
||||||
|
|||||||
@@ -13,18 +13,18 @@ const userSchema = mongoose.Schema({
|
|||||||
firstname: {
|
firstname: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
maxlength: 64,
|
maxlength: 24,
|
||||||
},
|
},
|
||||||
lastname: {
|
lastname: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
maxlength: 64,
|
maxlength: 24,
|
||||||
},
|
},
|
||||||
billing: {
|
billing: {
|
||||||
NIP: {
|
NIP: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
maxlength: 64,
|
maxlength: 20,
|
||||||
},
|
},
|
||||||
adress: {
|
adress: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user