Advertisement
Guest User

Untitled

a guest
May 16th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export const BankAccount = new mongoose.Schema({
  2.     vban: String,
  3.     ownerCharacter: { type: mongoose.Schema.Types.ObjectId, ref: 'Character' },
  4.     ownerFactory: { type: mongoose.Schema.Types.ObjectId, ref: 'Factory' },
  5.     bank: { type: mongoose.Schema.Types.ObjectId, ref: 'Bank' },
  6.     bankAccountType: {
  7.         type: mongoose.Schema.Types.ObjectId,
  8.         ref: 'BankAccountType'
  9.     },
  10.     pin: String,
  11.     money: { type: Number, default: 0 },
  12.     main: { type: Boolean, default: false },
  13.     transactions: [
  14.         { type: mongoose.Schema.Types.ObjectId, ref: 'BankTransaction' }
  15.     ]
  16. });
  17.  
  18. export const BankTransaction = new mongoose.Schema({
  19.     uuid: { type: String, default: '12345678-1234-1234-1234-123456789012' },
  20.     destinationAccount: { type: mongoose.Schema.Types.ObjectId, ref: 'BankAccount' },
  21.     amount: { type: Number, default: 10 },
  22.     taxAmount: { type: Number, default: 57 },
  23.     created: Date,
  24.     //ggf hier mal: performDate
  25.     type: { type: mongoose.Schema.Types.ObjectId, ref: 'BankTransactionType' },
  26. });
  27.  
  28. export const BankTransactionType = new mongoose.Schema({
  29.     name: String,
  30.     type: { type: String, default: 'digital' }
  31.     //ggf hier mal: taxrate
  32. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement