Commit project

This commit is contained in:
Rodrigo Pedroso 2019-06-19 10:46:14 -04:00
commit 3ac017a5ad
1030 changed files with 94062 additions and 0 deletions

26
models/transaction.js Normal file
View file

@ -0,0 +1,26 @@
'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var TransactionSchema = new Schema({
merchant_id: { type: Schema.Types.ObjectId, ref: 'Merchant' },
client_id: { type: Schema.Types.ObjectId, ref: 'Client' },
branch_id: { type: Schema.Types.ObjectId, ref: 'Branch' },
employee_id: { type: Schema.Types.ObjectId, ref: 'Employee' },
workstation_id: { type: Schema.Types.ObjectId, ref: 'Workstation' },
serial_number: String,
invoice: String,
type: String,
gift_card_id: { type: Schema.Types.ObjectId, ref: 'GiftCard' },
gift_card_number: String,
loyalty_card_id: { type: Schema.Types.ObjectId, ref: 'LoyaltyCard' },
money_amount: Number,
points_amount: Number,
cancelled_transaction_id: { type: Schema.Types.ObjectId, ref: 'Transaction'},
cancelled: Boolean,
remainder: Number,
message: String
}, {timestamps: true});
module.exports = mongoose.model('Transaction', TransactionSchema);