Added billable rates; Added project members; Added visibility to projects

This commit is contained in:
Constantin Graf
2024-03-28 18:50:04 +01:00
parent bb42b0940a
commit ba0212ea01
71 changed files with 3236 additions and 174 deletions

View File

@@ -18,6 +18,8 @@ return new class extends Migration
$table->foreignUuid('user_id')->index();
$table->string('name');
$table->boolean('personal_team');
$table->integer('billable_rate')->unsigned()->nullable();
$table->string('currency', 3);
$table->timestamps();
});
}

View File

@@ -18,6 +18,7 @@ return new class extends Migration
$table->foreignUuid('organization_id');
$table->foreignUuid('user_id');
$table->string('role')->nullable();
$table->integer('billable_rate')->unsigned()->nullable();
$table->timestamps();
$table->unique(['organization_id', 'user_id']);

View File

@@ -17,6 +17,8 @@ return new class extends Migration
$table->uuid('id')->primary();
$table->string('name', 255);
$table->string('color', 16);
$table->integer('billable_rate')->unsigned()->nullable();
$table->boolean('is_public')->default(false);
$table->uuid('client_id')->nullable();
$table->foreign('client_id')
->references('id')

View File

@@ -18,6 +18,7 @@ return new class extends Migration
$table->string('description', 500);
$table->dateTime('start');
$table->dateTime('end')->nullable();
$table->integer('billable_rate')->unsigned()->nullable();
$table->boolean('billable')->default(false);
$table->uuid('user_id');
$table->foreign('user_id')

View File

@@ -0,0 +1,42 @@
<?php
declare(strict_types=1);
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_members', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->integer('billable_rate')->unsigned()->nullable();
$table->uuid('project_id');
$table->foreign('project_id')
->references('id')
->on('projects')
->onDelete('restrict')
->onUpdate('cascade');
$table->uuid('user_id');
$table->foreign('user_id')
->references('id')
->on('users')
->onDelete('restrict')
->onUpdate('cascade');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('project_members');
}
};