初始化项目
This commit is contained in:
32
app/Models/System/DictionaryItem.php
Normal file
32
app/Models/System/DictionaryItem.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\System;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class DictionaryItem extends Model
|
||||
{
|
||||
protected $table = 'system_dictionary_items';
|
||||
|
||||
protected $fillable = [
|
||||
'dictionary_id',
|
||||
'label',
|
||||
'value',
|
||||
'color',
|
||||
'description',
|
||||
'is_default',
|
||||
'status',
|
||||
'sort',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'is_default' => 'boolean',
|
||||
'status' => 'boolean',
|
||||
];
|
||||
|
||||
public function dictionary(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Dictionary::class, 'dictionary_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user