zgo/backend/models/owner.js

25 lines
889 B
JavaScript
Raw Normal View History

2021-10-20 20:51:14 +00:00
const mongoose = require('mongoose');
const ownerSchema = mongoose.Schema({
2021-11-04 12:49:09 +00:00
address: {type: String, required:true, unique:true},
2021-11-22 20:37:45 +00:00
name: {type: String, required:true},
currency: {type: String, required:true, default: 'usd'},
tax: {type: Boolean, required: true, default: false},
taxValue: {type: Number },
vat: {type: Boolean, required:true, default: false},
2022-01-17 18:14:33 +00:00
vatValue: {type: Number },
2022-01-28 20:03:35 +00:00
first: {type: String, required:true},
last: {type: String, required:true},
2022-01-17 18:14:33 +00:00
email: {type: String, required:true},
street: {type: String, required:true},
city: {type: String, required: true},
state: {type: String, required: true},
postal: {type: String, required: true},
2022-01-22 13:49:22 +00:00
phone: {type: String},
2022-01-18 22:40:20 +00:00
website: {type: String},
2022-03-07 17:14:29 +00:00
paid: {type: Boolean, required: true, default: false},
zats: {type: Boolean, required: true, default: false}
2021-10-20 20:51:14 +00:00
});
module.exports = mongoose.model('Owner', ownerSchema);