22 lines
500 B
PHP
22 lines
500 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class MaintenanceNotification extends Model
|
|
{
|
|
protected $fillable = ['maintenance_window_id', 'customer_id', 'event', 'email', 'sent_at'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['sent_at' => 'datetime'];
|
|
}
|
|
|
|
public function window(): BelongsTo
|
|
{
|
|
return $this->belongsTo(MaintenanceWindow::class, 'maintenance_window_id');
|
|
}
|
|
}
|