feat:수당 지급 추적 컬럼 추가 마이그레이션
- 1차/2차 납입완료일, 수당지급일 컬럼 추가 - 매니저 수당 관련 컬럼 추가 (첫 구독료, 지급일) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 수당 지급 추적 컬럼 추가
|
||||||
|
*
|
||||||
|
* 영업파트너 수당: 2단계 (1차/2차 납입 → 익월 10일 수당지급)
|
||||||
|
* 매니저 수당: 첫 구독료 입금 → 익월 10일 수당지급
|
||||||
|
*/
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('sales_commissions', function (Blueprint $table) {
|
||||||
|
// 영업파트너 수당 - 1차
|
||||||
|
$table->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',
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user