diff --git a/database/migrations/2026_01_27_160000_create_barobill_pricing_policies_table.php b/database/migrations/2026_01_27_160000_create_barobill_pricing_policies_table.php new file mode 100644 index 0000000..e744058 --- /dev/null +++ b/database/migrations/2026_01_27_160000_create_barobill_pricing_policies_table.php @@ -0,0 +1,46 @@ +id(); + $table->string('service_type', 50)->comment('서비스 유형: card, tax_invoice, bank_account'); + $table->string('name', 100)->comment('정책명'); + $table->string('description')->nullable()->comment('설명'); + + // 기본 무료 제공량 + $table->integer('free_quota')->default(0)->comment('무료 기본 제공량'); + $table->string('free_quota_unit', 20)->default('개')->comment('무료 제공 단위 (장, 건, 개 등)'); + + // 추가 과금 설정 + $table->integer('additional_unit')->default(1)->comment('추가 과금 단위 (1, 50 등)'); + $table->string('additional_unit_label', 20)->default('개')->comment('추가 단위 라벨'); + $table->integer('additional_price')->default(0)->comment('추가 과금 금액 (원)'); + + $table->boolean('is_active')->default(true)->comment('활성화 여부'); + $table->integer('sort_order')->default(0)->comment('정렬 순서'); + + $table->timestamps(); + + $table->unique('service_type'); + $table->index('is_active'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('barobill_pricing_policies'); + } +};