Merge branch 'dillon/34.3-jenkins-vapor' into vapor/development

This commit is contained in:
Dillon Ngo
2024-05-17 14:57:02 +08:00
117 changed files with 5135 additions and 129 deletions
@@ -0,0 +1,44 @@
<?php
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBillGroupsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('bill_groups', function (Blueprint $table) {
$table->id();
$table->string('reference')->unique();
$table->foreignId('issuer')->unsigned();
$table->foreignId('receiver')->unsigned();
$table->decimal('amount', 14, 5)->default(0.00);
$table->decimal('original_amount', 14, 5)->default(0.00);
$table->foreignId('currency_id')->unsigned();
$table->foreignId('original_currency_id')->unsigned();
$table->decimal('currency_rate', 14, 5)->default(0.00);
$table->decimal('tax', 14, 5)->default(0.00);
$table->decimal('service_charge', 14, 5)->default(0.00);
$table->integer('status')->default(ApprovalStatus::PENDING_VERIFICATION);
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('bill_groups');
}
}
@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBillGroupPaymentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('bill_group_payments', function (Blueprint $table) {
$table->id();
$table->foreignId('bill_group_id')->constrained('bill_groups');
$table->foreignId('group_id')->constrained('groups');
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('bill_group_payments');
}
}
@@ -0,0 +1,22 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBillGroupRefundsTable extends Migration
{
public function up()
{
Schema::create('bill_group_refunds', function (Blueprint $table) {
$table->id();
$table->foreignId('bill_group_id')->unsigned()->on('bill_groups');
$table->foreignId('transaction_id')->unsigned()->on('transactions');
});
}
public function down()
{
Schema::dropIfExists('bill_group_refunds');
}
}
@@ -0,0 +1,41 @@
<?php
use App\Classes\ValueObjects\Constants\RemarkTypes;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRemarksTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('remarks', function (Blueprint $table) {
$table->id();
$table->morphs('owner');
$table->bigInteger('commenter_id')->unsigned()->index();
$table->string('content',200);
$table->integer('type')->default(RemarkTypes::INTERNAL);
$table->softDeletes();
$table->timestamps();
});
Schema::table('remarks', function (Blueprint $table) {
$table->string('owner_type', 191)->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('remarks');
}
}
+1 -1
View File
@@ -48,6 +48,6 @@ class DatabaseSeeder extends Seeder
$this->call(DummyDataSeeder::class);
}
DB::commit();
// DB::commit();
}
}