You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
857 B

1 month ago
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ApplicationReviewScore extends Model
{
protected $fillable = [
'application_id',
'reviewer_id',
'review_schema_id',
'payload_json',
'line_total',
];
/**
* @var array<string, string>
*/
protected $casts = [
'payload_json' => 'array',
'line_total' => 'decimal:4',
];
public function application(): BelongsTo
{
return $this->belongsTo(Application::class);
}
public function reviewer(): BelongsTo
{
return $this->belongsTo(Reviewer::class, 'reviewer_id');
}
public function reviewSchema(): BelongsTo
{
return $this->belongsTo(FormSchemaDefinition::class, 'review_schema_id');
}
}