PMCORE-1218

This commit is contained in:
Paula Quispe
2020-10-21 16:56:11 -04:00
parent 888c31615a
commit 53d779a7c7
7 changed files with 348 additions and 7 deletions

View File

@@ -42,7 +42,11 @@ $factory->define(\ProcessMaker\Model\Delegation::class, function(Faker $faker) {
$factory->state(\ProcessMaker\Model\Delegation::class, 'foreign_keys', function (Faker $faker) {
// Create values in the foreign key relations
$user = factory(\ProcessMaker\Model\User::class)->create();
$process = factory(\ProcessMaker\Model\Process::class)->create();
$category = factory(\ProcessMaker\Model\ProcessCategory::class)->create();
$process = factory(\ProcessMaker\Model\Process::class)->create([
'PRO_CATEGORY' => $category->CATEGORY_UID,
'CATEGORY_ID' => $category->CATEGORY_ID
]);
$task = factory(\ProcessMaker\Model\Task::class)->create([
'PRO_UID' => $process->PRO_UID,
'PRO_ID' => $process->PRO_ID
@@ -113,3 +117,10 @@ $factory->state(\ProcessMaker\Model\Delegation::class, 'closed', function (Faker
'DEL_FINISH_DATE' => $finishDate
];
});
// Create a last delegation
$factory->state(\ProcessMaker\Model\Delegation::class, 'last_thread', function (Faker $faker) {
return [
'DEL_LAST_INDEX' => 1,
];
});