34 lines
636 B
PHP
34 lines
636 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class ReportColumn extends Model
|
|
{
|
|
protected $fillable = [
|
|
'report_id',
|
|
'key',
|
|
'label',
|
|
'type',
|
|
'expression',
|
|
'sortable',
|
|
'visible',
|
|
'order',
|
|
'format_options',
|
|
];
|
|
|
|
protected $casts = [
|
|
'sortable' => 'boolean',
|
|
'visible' => 'boolean',
|
|
'order' => 'integer',
|
|
'format_options' => 'array',
|
|
];
|
|
|
|
public function report(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Report::class);
|
|
}
|
|
}
|