feat: implement Company History module with CRUD functionality, localization support, and timeline display for enhanced user experience
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?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('company_history_items', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedSmallInteger('year');
|
||||
$table->string('title');
|
||||
$table->text('content');
|
||||
$table->string('color', 7)->default('#17a2b8');
|
||||
$table->string('icon', 64)->default('heroicon-o-building-office-2');
|
||||
$table->enum('position', ['left', 'right'])->nullable();
|
||||
$table->boolean('is_active')->default(true);
|
||||
$table->unsignedInteger('sort_order')->default(0);
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->index(['is_active', 'sort_order']);
|
||||
$table->index('year');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('company_history_items');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user