Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0 into dillon/voucherify-35

# Conflicts:
#	routes/api.php
This commit is contained in:
edmondlang
2023-06-22 23:09:50 +08:00
88 changed files with 5423 additions and 85 deletions
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateStatementAccountsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('statement_accounts', function (Blueprint $table) {
$table->id();
$table->string('number')->unique();
$table->string('type');
$table->string('name');
$table->string('currency');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('statement_accounts');
}
}
@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAccountStatementsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('account_statements', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('statement_account_id');
$table->date('date_from');
$table->date('date_to');
$table->float('total_amount');
$table->float('begin_balance');
$table->float('end_balance');
$table->timestamps();
$table->foreign('statement_account_id')->references('id')->on('statement_accounts');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('account_statements');
}
}
@@ -0,0 +1,47 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateStatementTransactionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('statement_transactions', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('account_statement_id');
$table->dateTime('transaction_date')->nullable();
$table->dateTime('posting_date');
$table->string('transaction_description')->nullable();
$table->string('transaction_description_2')->nullable();
$table->string('transaction_description_3')->nullable();
$table->string('transaction_description_4')->nullable();
$table->string('transaction_description_5')->nullable();
$table->string('transaction_ref')->nullable();
$table->float('amount', 15, 2)->unsigned(false);
$table->string('teller_id')->nullable();
$table->string('branch_channel');
$table->string('transaction_code');
$table->string('end_balance')->nullable();
$table->timestamps();
$table->foreign('account_statement_id')->references('id')->on('account_statements');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('statement_transactions');
}
}
@@ -0,0 +1,45 @@
<?php
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\StatementTransactionOwnerType;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateStatementTransactionOwnersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('statement_transaction_owners', function (Blueprint $table) {
$table->id();
$table->foreignId('statement_transaction_id');
$table->integer('type')->default(StatementTransactionOwnerType::UNKNOWN);
$table->string('system')->nullable();
$table->string('owner_type')->nullable();
$table->bigInteger('owner_id')->nullable();
$table->string('owner_reference')->nullable();
$table->string('invoice_reference')->nullable();
$table->string('receipt_reference')->nullable();
$table->string('is_auto_mapped')->default(false);
$table->integer('status')->default(ApprovalStatus::PENDING_VERIFICATION);
$table->foreign('statement_transaction_id')->references('id')->on('statement_transactions');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('statement_transaction_owners');
}
}