new functionality: Add project coding configuration feature for projects
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled

This commit is contained in:
2025-12-09 23:02:35 +01:00
parent 7b00887372
commit e42ce8b092
13 changed files with 1169 additions and 28 deletions

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('project_coding_configs', function (Blueprint $table) {
$table->id();
$table->foreignId('project_id')->constrained()->onDelete('cascade')->unique();
$table->string('format')->default('[PROJECT]-[TYPE]-[YEAR]-[SEQUENCE]');
$table->json('elements')->nullable(); // Elementos configurados del código
$table->integer('next_sequence')->default(1);
$table->string('year_format')->default('Y'); // Y, y, YY, yyyy
$table->string('separator')->default('-');
$table->integer('sequence_length')->default(4);
$table->boolean('auto_generate')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('project_coding_configs');
}
};