diff --git a/app/Models/Quote/Quote.php b/app/Models/Quote/Quote.php index 66f274a..339ed4d 100644 --- a/app/Models/Quote/Quote.php +++ b/app/Models/Quote/Quote.php @@ -68,6 +68,8 @@ class Quote extends Model 'notes', // 자동산출 입력값 'calculation_inputs', + // 견적 옵션 (summary_items, expense_items, price_adjustments) + 'options', // 감사 'created_by', 'updated_by', @@ -81,6 +83,7 @@ class Quote extends Model 'finalized_at' => 'datetime', 'is_final' => 'boolean', 'calculation_inputs' => 'array', + 'options' => 'array', 'material_cost' => 'decimal:2', 'labor_cost' => 'decimal:2', 'install_cost' => 'decimal:2', diff --git a/database/migrations/2026_01_14_120218_add_options_to_quotes_table.php b/database/migrations/2026_01_14_120218_add_options_to_quotes_table.php new file mode 100644 index 0000000..b62771f --- /dev/null +++ b/database/migrations/2026_01_14_120218_add_options_to_quotes_table.php @@ -0,0 +1,29 @@ +json('options')->nullable()->after('calculation_inputs') + ->comment('견적 옵션 데이터 (summary_items, expense_items, price_adjustments)'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('quotes', function (Blueprint $table) { + $table->dropColumn('options'); + }); + } +};