mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 19:52:15 +01:00
Added billable rates; Added project members; Added visibility to projects
This commit is contained in:
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user