Two month of work
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?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('timesheets', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('timesheets');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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('timesheet_entries', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('timesheet_id')->constrained()->onDelete('cascade');
|
||||
$table->dateTime('date');
|
||||
$table->foreignId('user_id')->constrained()->onDelete('cascade');
|
||||
$table->text('description')->nullable();
|
||||
$table->float('hours');
|
||||
$table->boolean('billed')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('timesheet_entries');
|
||||
}
|
||||
};
|
||||
@@ -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('pipeline_lanes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title');
|
||||
$table->integer('position')->default(0)->index();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
protected $casts = [
|
||||
'position' => 'integer',
|
||||
'created_at' => 'datetime',
|
||||
'last_modified' => 'datetime',
|
||||
];
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('pipeline_lanes');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
<?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('pipeline_items', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('pipeline_lane_id')->constrained()->onDelete('cascade');
|
||||
$table->string('title');
|
||||
$table->integer('position')->default(0);
|
||||
$table->decimal('expected_revenue', 10, 2)->nullable();
|
||||
$table->timestamp('due_date')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
protected $casts = [
|
||||
'due_date' => 'datetime',
|
||||
'expected_revenue' => 'decimal:2',
|
||||
'created_at' => 'datetime',
|
||||
'last_modified' => 'datetime',
|
||||
];
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('pipeline_items');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user