diff --git a/database/migrations/2026_02_05_100000_create_vat_records_table.php b/database/migrations/2026_02_05_100000_create_vat_records_table.php new file mode 100644 index 0000000..a7a065d --- /dev/null +++ b/database/migrations/2026_02_05_100000_create_vat_records_table.php @@ -0,0 +1,37 @@ +id(); + $table->unsignedBigInteger('tenant_id'); + $table->string('period', 20); // 2026-1H, 2025-2H + $table->string('type', 20)->default('sales'); // sales, purchase + $table->string('partner_name', 100); // 거래처명 + $table->string('invoice_no', 50); // 세금계산서번호 + $table->date('invoice_date')->nullable(); // 발행일 + $table->bigInteger('supply_amount')->default(0); // 공급가액 + $table->bigInteger('vat_amount')->default(0); // 부가세 + $table->bigInteger('total_amount')->default(0); // 합계 + $table->string('status', 20)->default('pending');// pending, filed, paid + $table->text('memo')->nullable(); + $table->timestamps(); + $table->softDeletes(); + $table->index(['tenant_id', 'period']); + $table->index(['tenant_id', 'type']); + }); + } + + public function down(): void + { + Schema::dropIfExists('vat_records'); + } +};