Files
Credit-Zombies/database/migrations/2022_08_10_173331_create_sales_table.php
2026-06-24 18:29:01 +06:00

38 lines
999 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSalesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sales', function (Blueprint $table) {
$table->id();
$table->integer('user_id')->default(0);
$table->tinyInteger('status')->comment('1=completed,0=failed,2=pending');
$table->string('order_id',100)->unique();
$table->string('auth_code',50)->nullable()->comment('from api response authcode');
$table->string('transaction_id',100)->nullable()->comment('from api response tranx id');
$table->string('ip',50);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('sales');
}
}