Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export const BankAccount = new mongoose.Schema({
- vban: String,
- ownerCharacter: { type: mongoose.Schema.Types.ObjectId, ref: 'Character' },
- ownerFactory: { type: mongoose.Schema.Types.ObjectId, ref: 'Factory' },
- bank: { type: mongoose.Schema.Types.ObjectId, ref: 'Bank' },
- bankAccountType: {
- type: mongoose.Schema.Types.ObjectId,
- ref: 'BankAccountType'
- },
- pin: String,
- money: { type: Number, default: 0 },
- main: { type: Boolean, default: false },
- transactions: [
- { type: mongoose.Schema.Types.ObjectId, ref: 'BankTransaction' }
- ]
- });
- export const BankTransaction = new mongoose.Schema({
- uuid: { type: String, default: '12345678-1234-1234-1234-123456789012' },
- destinationAccount: { type: mongoose.Schema.Types.ObjectId, ref: 'BankAccount' },
- amount: { type: Number, default: 10 },
- taxAmount: { type: Number, default: 57 },
- created: Date,
- //ggf hier mal: performDate
- type: { type: mongoose.Schema.Types.ObjectId, ref: 'BankTransactionType' },
- });
- export const BankTransactionType = new mongoose.Schema({
- name: String,
- type: { type: String, default: 'digital' }
- //ggf hier mal: taxrate
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement