2025-08-18 19:03:46 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models\Tenants;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
2025-08-21 09:50:15 +09:00
|
|
|
/**
|
|
|
|
|
* @mixin IdeHelperTenantFieldSetting
|
|
|
|
|
*/
|
2025-08-18 19:03:46 +09:00
|
|
|
class TenantFieldSetting extends Model
|
|
|
|
|
{
|
|
|
|
|
public $timestamps = false;
|
|
|
|
|
|
|
|
|
|
protected $casts = [
|
|
|
|
|
'enabled' => 'boolean',
|
|
|
|
|
'required' => 'boolean',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'tenant_id',
|
|
|
|
|
'field_key',
|
|
|
|
|
'enabled',
|
|
|
|
|
'required',
|
|
|
|
|
'sort_order',
|
|
|
|
|
'option_group_id',
|
|
|
|
|
'code_group',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public function fieldDef()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(SettingFieldDef::class, 'field_key', 'field_key');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function optionGroup()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(TenantOptionGroup::class, 'option_group_id');
|
|
|
|
|
}
|
|
|
|
|
}
|