diff --git a/app/Models/Approvals/Approval.php b/app/Models/Approvals/Approval.php index e2e3c258..3371fa26 100644 --- a/app/Models/Approvals/Approval.php +++ b/app/Models/Approvals/Approval.php @@ -13,6 +13,8 @@ class Approval extends Model { use BelongsToTenant, SoftDeletes; + protected $connection = 'mysql'; + protected $table = 'approvals'; protected $casts = [ diff --git a/app/Models/Boards/File.php b/app/Models/Boards/File.php index 8b86a422..fff9f652 100644 --- a/app/Models/Boards/File.php +++ b/app/Models/Boards/File.php @@ -12,6 +12,8 @@ /** * 파일 모델 (Polymorphic) * + * @note $connection = 'mysql' 명시: codebridge 모델에서 relation으로 참조 시 connection 상속 방지 + * * @property int $id * @property int|null $tenant_id * @property int|null $folder_id @@ -31,6 +33,8 @@ class File extends Model { use SoftDeletes; + protected $connection = 'mysql'; + protected $table = 'files'; protected $fillable = [ diff --git a/app/Models/Commons/File.php b/app/Models/Commons/File.php index fe3ce2bd..71a5c1c7 100644 --- a/app/Models/Commons/File.php +++ b/app/Models/Commons/File.php @@ -6,6 +6,8 @@ class File extends Model { + protected $connection = 'mysql'; + protected $table = 'files'; protected $fillable = [ diff --git a/app/Models/Department.php b/app/Models/Department.php index 17866f41..bca518cd 100644 --- a/app/Models/Department.php +++ b/app/Models/Department.php @@ -11,6 +11,8 @@ class Department extends Model { use SoftDeletes; + protected $connection = 'mysql'; + protected $table = 'departments'; protected $fillable = [ diff --git a/app/Models/Interview/InterviewProject.php b/app/Models/Interview/InterviewProject.php index 187e3412..2ae49e05 100644 --- a/app/Models/Interview/InterviewProject.php +++ b/app/Models/Interview/InterviewProject.php @@ -12,6 +12,8 @@ class InterviewProject extends Model { use BelongsToTenant, ModelTrait, SoftDeletes; + protected $connection = 'mysql'; + protected $fillable = [ 'tenant_id', 'company_name', diff --git a/app/Models/Process.php b/app/Models/Process.php index 1907c1c8..ecb8d0ea 100644 --- a/app/Models/Process.php +++ b/app/Models/Process.php @@ -10,6 +10,8 @@ class Process extends Model { use BelongsToTenant, SoftDeletes; + protected $connection = 'mysql'; + protected $fillable = [ 'tenant_id', 'process_code', diff --git a/app/Models/Rd/AiQuotationModule.php b/app/Models/Rd/AiQuotationModule.php index 5378f21d..a653d0ac 100644 --- a/app/Models/Rd/AiQuotationModule.php +++ b/app/Models/Rd/AiQuotationModule.php @@ -9,6 +9,8 @@ class AiQuotationModule extends Model { use BelongsToTenant; + protected $connection = 'mysql'; + protected $table = 'ai_quotation_modules'; protected $fillable = [ diff --git a/app/Models/Tenants/Tenant.php b/app/Models/Tenants/Tenant.php index 8fd6ea9e..f0a601e5 100644 --- a/app/Models/Tenants/Tenant.php +++ b/app/Models/Tenants/Tenant.php @@ -12,6 +12,8 @@ class Tenant extends Model { use SoftDeletes; + protected $connection = 'mysql'; + protected $table = 'tenants'; protected $fillable = [ diff --git a/app/Models/User.php b/app/Models/User.php index 9240da23..c34db692 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -15,6 +15,8 @@ class User extends Authenticatable { use HasApiTokens, HasFactory, Notifiable, SoftDeletes; + protected $connection = 'mysql'; + /** * The attributes that are mass assignable. *