first
This commit is contained in:
35
app/Models/ExportLog.php
Normal file
35
app/Models/ExportLog.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class ExportLog extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'generated_at' => 'datetime',
|
||||
'filter_parameters' => 'array',
|
||||
'purged_at' => 'datetime',
|
||||
];
|
||||
}
|
||||
|
||||
public function election(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Election::class);
|
||||
}
|
||||
|
||||
public function generatedBy(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'generated_by_user_id');
|
||||
}
|
||||
|
||||
public function purgedBy(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'purged_by_user_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user