diff --git a/database/migrations/2026_02_02_195500_add_payment_tracking_columns_to_sales_commissions_table.php b/database/migrations/2026_02_02_195500_add_payment_tracking_columns_to_sales_commissions_table.php new file mode 100644 index 0000000..ee10c9d --- /dev/null +++ b/database/migrations/2026_02_02_195500_add_payment_tracking_columns_to_sales_commissions_table.php @@ -0,0 +1,51 @@ +date('first_payment_at')->nullable()->after('payment_date') + ->comment('1차 납입완료일'); + $table->date('first_partner_paid_at')->nullable()->after('first_payment_at') + ->comment('1차 파트너 수당지급일'); + + // 영업파트너 수당 - 2차 + $table->date('second_payment_at')->nullable()->after('first_partner_paid_at') + ->comment('2차 납입완료일'); + $table->date('second_partner_paid_at')->nullable()->after('second_payment_at') + ->comment('2차 파트너 수당지급일'); + + // 매니저 수당 + $table->date('first_subscription_at')->nullable()->after('second_partner_paid_at') + ->comment('첫 구독료 입금일 (매니저 수당 기준)'); + $table->date('manager_paid_at')->nullable()->after('first_subscription_at') + ->comment('매니저 수당지급일'); + }); + } + + public function down(): void + { + Schema::table('sales_commissions', function (Blueprint $table) { + $table->dropColumn([ + 'first_payment_at', + 'first_partner_paid_at', + 'second_payment_at', + 'second_partner_paid_at', + 'first_subscription_at', + 'manager_paid_at', + ]); + }); + } +};