feat: [database] codebridge DB 분리 재적용 - 55개 MNG 전용 모델만 설정
- API 사용 테이블 22개(23개 모델) 제외하고 55개 모델만 $connection = 'codebridge' 적용 - config/database.php에 codebridge connection 재추가 - 제외 대상: Barobill 12개, ESign 4개, Audit 2개, DevTools 1개, System 2개, HR 1개
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
class AdminApiFlow extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_api_flows';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -37,6 +37,7 @@ class AdminApiFlowRun extends Model
|
||||
|
||||
public const STATUS_PARTIAL = 'PARTIAL';
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_api_flow_runs';
|
||||
|
||||
public $timestamps = false; // created_at만 사용
|
||||
|
||||
@@ -27,6 +27,7 @@ class AdminPmDailyLog extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_pm_daily_logs';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
class AdminPmDailyLogEntry extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_pm_daily_log_entries';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -29,6 +29,7 @@ class AdminPmIssue extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_pm_issues';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -28,6 +28,7 @@ class AdminPmProject extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_pm_projects';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -31,6 +31,7 @@ class AdminPmTask extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_pm_tasks';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -11,6 +11,7 @@ class AdminRoadmapMilestone extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_roadmap_milestones';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -12,6 +12,7 @@ class AdminRoadmapPlan extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_roadmap_plans';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
class BizCert extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'biz_cert';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
class ApiBookmark extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_api_bookmarks';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
class ApiDeprecation extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_api_deprecations';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
class ApiEnvironment extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_api_environments';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -29,6 +29,7 @@ class ApiHistory extends Model
|
||||
*/
|
||||
public const UPDATED_AT = null;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_api_histories';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
class ApiTemplate extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_api_templates';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
class EsignFieldTemplate extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'esign_field_templates';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
class EsignFieldTemplateItem extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'esign_field_template_items';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -14,6 +14,7 @@ class Equipment extends Model
|
||||
{
|
||||
use BelongsToTenant, SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'equipments';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
class EquipmentProcess extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'equipment_process';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -9,6 +9,7 @@ class CondolenceExpense extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'condolence_expenses';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -9,6 +9,7 @@ class ConsultingFee extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'consulting_fees';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -9,6 +9,7 @@ class CorporateCard extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'corporate_cards';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
class CorporateCardPrepayment extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'corporate_card_prepayments';
|
||||
|
||||
protected $fillable = ['tenant_id', 'year_month', 'amount', 'memo', 'items'];
|
||||
|
||||
@@ -9,6 +9,7 @@ class CustomerSettlement extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'customer_settlements';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
class DailyFundMemo extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'daily_fund_memos';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -9,6 +9,7 @@ class DailyFundTransaction extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'daily_fund_transactions';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -9,6 +9,7 @@ class Income extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'incomes';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -9,6 +9,7 @@ class SalesRecord extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_records';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -9,6 +9,7 @@ class VatRecord extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'vat_records';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -12,6 +12,7 @@ class BusinessIncomePayment extends Model
|
||||
{
|
||||
use ModelTrait, SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'business_income_payments';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -12,6 +12,7 @@ class InterviewKnowledge extends Model
|
||||
{
|
||||
use BelongsToTenant, ModelTrait, SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'interview_knowledge';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -13,6 +13,7 @@ class ConstructionSitePhoto extends Model
|
||||
{
|
||||
use BelongsToTenant, SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'construction_site_photos';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
class ConstructionSitePhotoRow extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'construction_site_photo_rows';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -13,6 +13,7 @@ class MeetingMinute extends Model
|
||||
{
|
||||
use BelongsToTenant, SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'meeting_minutes';
|
||||
|
||||
const STATUS_DRAFT = 'DRAFT';
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
class MeetingMinuteSegment extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'meeting_minute_segments';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -16,6 +16,7 @@ class MeetingLog extends Model
|
||||
{
|
||||
use BelongsToTenant, SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'admin_meeting_logs';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -12,6 +12,7 @@ class CmSong extends Model
|
||||
{
|
||||
use BelongsToTenant, SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'cm_songs';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -45,6 +45,7 @@ class SalesCommission extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_commissions';
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
class SalesCommissionDetail extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_commission_details';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -31,6 +31,7 @@ class SalesConsultation extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_consultations';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
class SalesContractProduct extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_contract_products';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -11,6 +11,7 @@ class SalesManager extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_managers';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -12,6 +12,7 @@ class SalesManagerDocument extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_manager_documents';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -31,6 +31,7 @@ class SalesPartner extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_partners';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -28,6 +28,7 @@ class SalesProduct extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_products';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -21,6 +21,7 @@ class SalesProductCategory extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_product_categories';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -11,6 +11,7 @@ class SalesProspect extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_prospects';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -10,6 +10,7 @@ class SalesProspectConsultation extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_prospect_consultations';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -10,6 +10,7 @@ class SalesProspectProduct extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_prospect_products';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
class SalesProspectScenario extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_prospect_scenarios';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -10,6 +10,7 @@ class SalesRecord extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_records';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
class SalesScenarioChecklist extends Model
|
||||
{
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_scenario_checklists';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -37,6 +37,7 @@ class SalesTenantManagement extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'sales_tenant_managements';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -16,6 +16,7 @@ class TenantProspect extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'tenant_prospects';
|
||||
|
||||
public const STATUS_ACTIVE = 'active'; // 영업권 유효
|
||||
|
||||
@@ -26,6 +26,7 @@ class AiConfig extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $connection = 'codebridge';
|
||||
protected $table = 'ai_configs';
|
||||
|
||||
protected $fillable = [
|
||||
|
||||
@@ -63,6 +63,26 @@
|
||||
]) : [],
|
||||
],
|
||||
|
||||
// 코드브릿지엑스 내부 관리 DB (codebridge)
|
||||
'codebridge' => [
|
||||
'driver' => 'mysql',
|
||||
'host' => env('CODEBRIDGE_DB_HOST', env('DB_HOST', '127.0.0.1')),
|
||||
'port' => env('CODEBRIDGE_DB_PORT', env('DB_PORT', '3306')),
|
||||
'database' => env('CODEBRIDGE_DB_DATABASE', 'codebridge'),
|
||||
'username' => env('CODEBRIDGE_DB_USERNAME', env('DB_USERNAME')),
|
||||
'password' => env('CODEBRIDGE_DB_PASSWORD', env('DB_PASSWORD')),
|
||||
'unix_socket' => '',
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||
]) : [],
|
||||
],
|
||||
|
||||
// 통계/알림 DB (sam_stat)
|
||||
'sam_stat' => [
|
||||
'driver' => 'mysql',
|
||||
|
||||
Reference in New Issue
Block a user