fix: [tenant] 데모 관련 필드를 fillable에서 제거
- tenant_type, demo_expires_at, demo_source_partner_id를 fillable에서 제외 - 기존 mass assignment 동작에 영향 없도록 보호 - convertToProduction()에서 forceFill() 사용으로 변경
This commit is contained in:
@@ -60,9 +60,6 @@ class Tenant extends Model
|
||||
'options',
|
||||
'tenant_st_code',
|
||||
'billing_tp_code',
|
||||
'tenant_type',
|
||||
'demo_expires_at',
|
||||
'demo_source_partner_id',
|
||||
];
|
||||
|
||||
protected $guarded = [
|
||||
@@ -384,14 +381,15 @@ public function getDemoLimits(): array
|
||||
|
||||
/**
|
||||
* 데모 → 정식 테넌트로 전환
|
||||
* fillable 밖의 컬럼이므로 forceFill 사용
|
||||
*/
|
||||
public function convertToProduction(): void
|
||||
{
|
||||
$this->update([
|
||||
$this->forceFill([
|
||||
'tenant_type' => self::TYPE_STD,
|
||||
'demo_expires_at' => null,
|
||||
'demo_source_partner_id' => null,
|
||||
]);
|
||||
])->save();
|
||||
|
||||
// options에서 데모 관련 키 제거
|
||||
$options = $this->options ?? [];
|
||||
|
||||
Reference in New Issue
Block a user