diff --git a/database/migrations/2022_11_08_105659_create_payments_table.php b/database/migrations/2022_11_08_105659_create_payments_table.php new file mode 100644 index 00000000..ed564b8c --- /dev/null +++ b/database/migrations/2022_11_08_105659_create_payments_table.php @@ -0,0 +1,47 @@ +id(); + $table->unsignedBigInteger('invoice_id')->nullable()->index(); + $table->unsignedBigInteger('payment_method_id')->nullable()->index(); + $table->string('transaction_id')->nullable()->index(); + $table->string('invoice_number')->nullable()->index(); + $table->string('invoiced_total_net')->nullable(); + $table->string('amount')->nullable(); + $table->string('admin_fee')->nullable(); + $table->string('method')->nullable(); + $table->string('status')->nullable(); + $table->string('note')->nullable(); + $table->string('payment_gateway_ref_id')->nullable()->index(); + $table->text('payment_gateway_request_data')->nullable(); + $table->timestamps(); + $table->softDeletes(); + $table->unsignedBigInteger('created_by')->nullable()->index(); + $table->unsignedBigInteger('updated_by')->nullable()->index(); + $table->unsignedBigInteger('deleted_by')->nullable()->index(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('payments'); + } +}; diff --git a/database/migrations/2022_11_08_110502_create_payment_methods_table.php b/database/migrations/2022_11_08_110502_create_payment_methods_table.php new file mode 100644 index 00000000..5e0332b2 --- /dev/null +++ b/database/migrations/2022_11_08_110502_create_payment_methods_table.php @@ -0,0 +1,38 @@ +id(); + $table->unsignedBigInteger('config_pmc_id')->nullable()->index(); + $table->string('code')->nullable(); + $table->string('name')->nullable(); + $table->string('image')->nullable(); + $table->integer('timeout')->nullable(); + $table->boolean('active')->default(true); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('payment_methods'); + } +};