zgo/backend/models/owner.js

13 lines
451 B
JavaScript

const mongoose = require('mongoose');
const ownerSchema = mongoose.Schema({
address: {type: String, required:true, unique:true},
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},
vatValue: {type: Number }
});
module.exports = mongoose.model('Owner', ownerSchema);