38 lines
758 B
PHP
38 lines
758 B
PHP
<?php
|
|
|
|
namespace App\Domain\Catalog;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class CompatibilityAttestation extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = [
|
|
'composition_version_id',
|
|
'resolved_hash',
|
|
'confirmed_by',
|
|
'confirmed_at',
|
|
'note',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'confirmed_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
public function compositionVersion(): BelongsTo
|
|
{
|
|
return $this->belongsTo(CompositionVersion::class);
|
|
}
|
|
|
|
public function confirmer(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'confirmed_by');
|
|
}
|
|
}
|