mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix transaction seed
This commit is contained in:
parent
1840878513
commit
b6618d1ffa
@ -2,6 +2,7 @@ import Faker from 'faker'
|
||||
import { define } from 'typeorm-seeding'
|
||||
import { Transaction } from '../../entity/Transaction'
|
||||
import { TransactionContext } from '../interface/TransactionContext'
|
||||
import Decimal from 'decimal.js-light'
|
||||
|
||||
define(Transaction, (faker: typeof Faker, context?: TransactionContext) => {
|
||||
if (!context) {
|
||||
@ -12,6 +13,8 @@ define(Transaction, (faker: typeof Faker, context?: TransactionContext) => {
|
||||
transaction.typeId = context.typeId // || 2
|
||||
transaction.userId = context.userId
|
||||
transaction.amount = context.amount
|
||||
transaction.balance = context.balance
|
||||
transaction.decay = new Decimal(0) // context.decay
|
||||
transaction.memo = context.memo
|
||||
transaction.creationDate = context.creationDate || new Date()
|
||||
// transaction.sendReceiverPublicKey = context.sendReceiverPublicKey || null
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user