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 IdeHelperSettingFieldDef
|
|
|
|
|
*/
|
2025-08-18 19:03:46 +09:00
|
|
|
class SettingFieldDef extends Model
|
|
|
|
|
{
|
|
|
|
|
protected $casts = [
|
|
|
|
|
'option_payload' => 'array',
|
|
|
|
|
'is_core' => 'boolean',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'field_key',
|
|
|
|
|
'label',
|
|
|
|
|
'data_type',
|
|
|
|
|
'input_type',
|
|
|
|
|
'option_source',
|
|
|
|
|
'option_payload',
|
|
|
|
|
'comment',
|
|
|
|
|
'created_at',
|
|
|
|
|
'updated_at',
|
|
|
|
|
'storage_area',
|
|
|
|
|
'storage_key',
|
|
|
|
|
'is_core',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// 관계 (테넌트 설정)
|
|
|
|
|
public function tenantSettings()
|
|
|
|
|
{
|
|
|
|
|
return $this->hasMany(TenantFieldSetting::class, 'field_key', 'field_key');
|
|
|
|
|
}
|
|
|
|
|
}
|