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.

31 lines
591 B

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class DictItem extends Model
{
protected $fillable = [
'dict_type_id',
'label',
'value',
'sort',
'status',
'extra_json',
];
protected $casts = [
'dict_type_id' => 'integer',
'sort' => 'integer',
'status' => 'integer',
'extra_json' => 'array',
];
public function dictType(): BelongsTo
{
return $this->belongsTo(DictType::class, 'dict_type_id');
}
}