Donation system of OYD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
bagis/database/migrations/2020_05_15_225602_create_do...

48 lines
1.5 KiB

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDonationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('donations', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->nullable()->default(null);
$table->string('conversation_id');
$table->string('first_name');
$table->string('last_name');
$table->boolean('show_name_on_list')->default(false);
$table->string('email');
$table->float("amount")->unsigned();
$table->enum("currency", ["USD", "EUR", "TL"]);
$table->enum("frequency", ["once", "monthly", "annually"]);
$table->json("billing_info");
$table->json("payment_result");
$table->string('card_token')->nullable()->default(null);
$table->string('card_user_key')->nullable()->default(null);
$table->string('card_cvc')->nullable()->default(null);
$table->date('next_payment_at')->nullable()->default(null);
$table->integer('next_payment_tried')->default(0);
$table->foreignId('next_payment_id')->nullable()->default(null);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('donations');
}
}