2018-03-01 11:52:36 +08:00
|
|
|
<?php
|
|
|
|
|
2021-04-13 21:25:38 +08:00
|
|
|
use App\Models\Journal;
|
|
|
|
use Carbon\Carbon;
|
2018-03-01 11:52:36 +08:00
|
|
|
use Faker\Generator as Faker;
|
2021-04-13 21:25:38 +08:00
|
|
|
use Ramsey\Uuid\Uuid;
|
2018-03-01 11:52:36 +08:00
|
|
|
|
2021-04-13 21:25:38 +08:00
|
|
|
$factory->define(App\Models\JournalTransaction::class, function (Faker $faker) {
|
2018-03-01 11:52:36 +08:00
|
|
|
return [
|
2021-04-13 21:25:38 +08:00
|
|
|
'transaction_group' => Uuid::uuid4()->toString(),
|
2018-03-20 09:50:40 +08:00
|
|
|
'journal_id' => function () {
|
2021-04-13 21:25:38 +08:00
|
|
|
return factory(Journal::class)->create()->id;
|
2018-03-01 11:52:36 +08:00
|
|
|
},
|
2018-08-27 00:40:04 +08:00
|
|
|
'credit' => $faker->numberBetween(100, 10000),
|
|
|
|
'debit' => $faker->numberBetween(100, 10000),
|
|
|
|
'currency' => 'USD',
|
|
|
|
'memo' => $faker->sentence(6),
|
2021-04-13 21:25:38 +08:00
|
|
|
'post_date' => Carbon::now('UTC'),
|
2018-03-01 11:52:36 +08:00
|
|
|
];
|
|
|
|
});
|