From 7028e27517485aed08d15d0d8c26c00e61a4f405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Sat, 28 Feb 2026 19:31:46 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[document]=20=EB=B8=94=EB=A1=9D=20?= =?UTF-8?q?=EB=B9=8C=EB=8D=94=20=EC=A7=80=EC=9B=90=20=EB=A7=88=EC=9D=B4?= =?UTF-8?q?=EA=B7=B8=EB=A0=88=EC=9D=B4=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - document_templates: builder_type, schema, page_config 컬럼 추가 - documents: data JSON, rendered_html, pdf_path 컬럼 추가 --- ...dd_block_builder_to_document_templates.php | 33 +++++++++++++++++++ ..._28_100001_add_block_data_to_documents.php | 33 +++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 database/migrations/2026_02_28_100000_add_block_builder_to_document_templates.php create mode 100644 database/migrations/2026_02_28_100001_add_block_data_to_documents.php diff --git a/database/migrations/2026_02_28_100000_add_block_builder_to_document_templates.php b/database/migrations/2026_02_28_100000_add_block_builder_to_document_templates.php new file mode 100644 index 0000000..d742fbc --- /dev/null +++ b/database/migrations/2026_02_28_100000_add_block_builder_to_document_templates.php @@ -0,0 +1,33 @@ +string('builder_type', 20)->default('legacy')->after('category') + ->comment('빌더 유형 (legacy: 기존 EAV, block: 블록 빌더)'); + $table->json('schema')->nullable()->after('footer_judgement_options') + ->comment('블록 빌더 JSON 스키마'); + $table->json('page_config')->nullable()->after('schema') + ->comment('페이지 설정 (용지 크기, 방향, 여백 등)'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('document_templates', function (Blueprint $table) { + $table->dropColumn(['builder_type', 'schema', 'page_config']); + }); + } +}; diff --git a/database/migrations/2026_02_28_100001_add_block_data_to_documents.php b/database/migrations/2026_02_28_100001_add_block_data_to_documents.php new file mode 100644 index 0000000..7d3668f --- /dev/null +++ b/database/migrations/2026_02_28_100001_add_block_data_to_documents.php @@ -0,0 +1,33 @@ +json('data')->nullable()->after('status') + ->comment('블록 빌더 문서 데이터 (JSON)'); + $table->longText('rendered_html')->nullable()->after('data') + ->comment('렌더링된 HTML (PDF 생성용 캐시)'); + $table->string('pdf_path', 500)->nullable()->after('rendered_html') + ->comment('생성된 PDF 파일 경로'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('documents', function (Blueprint $table) { + $table->dropColumn(['data', 'rendered_html', 'pdf_path']); + }); + } +};