2019_08_05_174246_create_deposit_logs_table.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateDepositLogsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('deposit_logs', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->bigInteger('user_id')->default(0)->comment('用户id');
  17. $table->decimal('money', 15, 2)->default(0.00)->comment('押金');
  18. $table->tinyInteger('type')->default(0)->comment('押金类型');
  19. $table->bigInteger('area_id')->default(0)->comment('区域id');
  20. $table->tinyInteger('pay_status')->default(0)->comment('支付状态');
  21. $table->decimal('pay_money', 15, 2)->default(0.00)->comment('支付金额');
  22. $table->tinyInteger('pay_type')->default(0)->comment('支付方式(0:未支付;1:已支付)');
  23. $table->tinyInteger('is_refund')->default(0)->comment('是否退款');
  24. $table->timestamps();
  25. });
  26. }
  27. /**
  28. * Reverse the migrations.
  29. *
  30. * @return void
  31. */
  32. public function down()
  33. {
  34. Schema::dropIfExists('deposit_logs');
  35. }
  36. }