30 lines
613 B
PHP
30 lines
613 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class AddressBookMeta extends Model
|
|
{
|
|
protected $table = 'addressbook_meta';
|
|
protected $primaryKey = 'addressbook_id';
|
|
public $incrementing = false;
|
|
|
|
protected $fillable = [
|
|
'color',
|
|
'is_default',
|
|
'settings',
|
|
];
|
|
|
|
protected $casts = [
|
|
'settings' => 'array',
|
|
'is_default' => 'boolean',
|
|
];
|
|
|
|
public function addressBook(): BelongsTo
|
|
{
|
|
return $this->belongsTo(AddressBook::class, 'addressbook_id');
|
|
}
|
|
}
|