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

@@ -77,6 +77,14 @@ $factory->state(\ProcessMaker\Model\Application::class, 'draft', function (Faker
];
});
$factory->state(\ProcessMaker\Model\Application::class, 'completed', function (Faker $faker) {
return [
'APP_NUMBER' => $faker->unique()->numberBetween(1000),
'APP_STATUS_ID' => 3,
'APP_STATUS' => 'COMPLETED'
];
});
$factory->state(\ProcessMaker\Model\Application::class, 'draft_minor_case', function (Faker $faker) {
$caseNumber = $faker->unique()->numberBetween(1, 1000);
return [

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,
];
});