feat: initial commit
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class () extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('transactions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('account_id')->constrained()->onDelete('cascade');
|
||||
$table->string('description')->nullable();
|
||||
$table->decimal('gross_amount');
|
||||
$table->decimal('exempt')->nullable();
|
||||
$table->decimal('zero_rated')->nullable();
|
||||
$table->decimal('vatable_amount')->nullable();
|
||||
|
||||
$table->decimal('net_amount')->nullable();
|
||||
$table->decimal('input_tax')->nullable();
|
||||
$table->decimal('output_tax')->nullable();
|
||||
|
||||
$table->boolean('with_tax')->default(false);
|
||||
|
||||
$table->decimal('payable_withholding_tax')->nullable();
|
||||
$table->decimal('creditable_withholding_tax')->nullable();
|
||||
|
||||
$table->foreignId('expense_id')->nullable()->constrained()->onDelete('cascade');
|
||||
$table->foreignId('sale_id')->nullable()->constrained()->onDelete('cascade');
|
||||
$table->foreignId('branch_id')->constrained()->onDelete('cascade');
|
||||
$table->foreignId('client_id')->constrained()->onDelete('cascade');
|
||||
$table->date('happened_on');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('transactions');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user