* fix password reset bug * upgrade to laravel 11 * composer.lock * fix migration issues * use ValidationRule Contract * rename password_resets table * implemented casts as protected function * update env variables * fix optional property * fix validation issues * use <env> on php unit xml * fix pint * cmposer.lock * composer json fixes * fix composer dependencies, remove faker * remove unused class * remove test class * fix default value for mysql migration * linting * expression syntax fix --------- Co-authored-by: Julien Nahum <julien@nahum.net>
43 lines
842 B
PHP
43 lines
842 B
PHP
<?php
|
|
|
|
namespace App\Models\Integration;
|
|
|
|
use App\Events\Models\FormIntegrationsEventCreated;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class FormIntegrationsEvent extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
public const STATUS_SUCCESS = 'success';
|
|
public const STATUS_ERROR = 'error';
|
|
|
|
protected $fillable = [
|
|
'integration_id',
|
|
'status',
|
|
'data'
|
|
];
|
|
|
|
protected function casts()
|
|
{
|
|
return [
|
|
'data' => 'object'
|
|
];
|
|
}
|
|
|
|
/**
|
|
* The event map for the model.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $dispatchesEvents = [
|
|
'created' => FormIntegrationsEventCreated::class,
|
|
];
|
|
|
|
public function integration()
|
|
{
|
|
return $this->belongsTo(FormIntegration::class, 'integration_id');
|
|
}
|
|
}
|