2020-02-05 09:11:54 -04:00
|
|
|
<?php
|
|
|
|
|
|
2022-07-21 00:04:21 -04:00
|
|
|
namespace Database\Factories;
|
2020-02-05 09:11:54 -04:00
|
|
|
|
2022-07-21 00:04:21 -04:00
|
|
|
use App\Factories\Factory;
|
|
|
|
|
use Illuminate\Support\Str;
|
|
|
|
|
|
|
|
|
|
class EmailEventFactory extends Factory
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Define the model's default state.
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
public function definition()
|
|
|
|
|
{
|
|
|
|
|
$bpmnEvent = \ProcessMaker\Model\BpmnEvent::factory()->create();
|
|
|
|
|
return [
|
|
|
|
|
'EMAIL_EVENT_UID' => $this->faker->regexify("/[a-zA-Z]{32}/"),
|
|
|
|
|
'PRJ_UID' => $bpmnEvent->PRJ_UID,
|
|
|
|
|
'EVN_UID' => $bpmnEvent->EVN_UID,
|
|
|
|
|
'EMAIL_EVENT_FROM' => $this->faker->email,
|
|
|
|
|
'EMAIL_EVENT_TO' => $this->faker->email,
|
|
|
|
|
'EMAIL_EVENT_SUBJECT' => $this->faker->title,
|
|
|
|
|
'PRF_UID' => function () {
|
|
|
|
|
return \ProcessMaker\Model\ProcessFiles::factory()->create()->PRF_UID;
|
|
|
|
|
},
|
|
|
|
|
'EMAIL_SERVER_UID' => function () {
|
|
|
|
|
return \ProcessMaker\Model\EmailServerModel::factory()->create()->MESS_UID;
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|