fix : 테넌트별 옵션설정 작업
- Tenant Fields - Tenant Option Groups - Tenant Option Values - Tenant Profiles
This commit is contained in:
35
app/Models/Tenants/TenantFieldSetting.php
Normal file
35
app/Models/Tenants/TenantFieldSetting.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Tenants;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user