Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
2026-02-13 03:44:34 +09:00
3 changed files with 88 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('esign_field_templates', function (Blueprint $table) {
$table->id();
$table->foreignId('tenant_id')->constrained()->onDelete('cascade')->comment('테넌트 ID');
$table->string('name', 100)->comment('템플릿 이름');
$table->text('description')->nullable()->comment('템플릿 설명');
$table->unsignedTinyInteger('signer_count')->default(2)->comment('서명자 수');
$table->boolean('is_active')->default(true)->comment('활성 여부');
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete()->comment('생성자 ID');
$table->timestamps();
$table->index('tenant_id', 'idx_esign_field_templates_tenant');
$table->index('is_active', 'idx_esign_field_templates_active');
});
}
public function down(): void
{
Schema::dropIfExists('esign_field_templates');
}
};

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('esign_field_template_items', function (Blueprint $table) {
$table->id();
$table->foreignId('template_id')->constrained('esign_field_templates')->onDelete('cascade')->comment('템플릿 ID');
$table->unsignedTinyInteger('signer_order')->comment('서명자 순서 (1, 2, ...)');
$table->unsignedSmallInteger('page_number')->comment('페이지 번호');
$table->decimal('position_x', 8, 2)->comment('X 좌표 (%)');
$table->decimal('position_y', 8, 2)->comment('Y 좌표 (%)');
$table->decimal('width', 8, 2)->comment('너비 (%)');
$table->decimal('height', 8, 2)->comment('높이 (%)');
$table->enum('field_type', ['signature', 'stamp', 'text', 'date', 'checkbox'])->default('signature')->comment('필드 유형');
$table->string('field_label', 100)->nullable()->comment('필드 라벨');
$table->boolean('is_required')->default(true)->comment('필수 여부');
$table->unsignedSmallInteger('sort_order')->default(0)->comment('정렬 순서');
$table->timestamps();
$table->index('template_id', 'idx_esign_field_template_items_template');
});
}
public function down(): void
{
Schema::dropIfExists('esign_field_template_items');
}
};

View File

@@ -0,0 +1,24 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('esign_field_templates', function (Blueprint $table) {
$table->string('category', 50)->nullable()->after('description')->comment('템플릿 카테고리');
$table->index('category', 'idx_esign_field_templates_category');
});
}
public function down(): void
{
Schema::table('esign_field_templates', function (Blueprint $table) {
$table->dropIndex('idx_esign_field_templates_category');
$table->dropColumn('category');
});
}
};