2019_08_05_161804_create_wallet_logs_table.php 949 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateWalletLogsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('wallet_logs', function (Blueprint $table) {
  15. $table->bigIncrements('id');
  16. $table->string('name')->comment('交易名称');
  17. $table->string('type', 20)->comment('交易类型');
  18. $table->decimal('money', 7, 2)->default(0.00)->comment('交易金额');
  19. $table->bigInteger('user_id')->default(0)->comment('用户id');
  20. $table->tinyInteger('status')->default(1);
  21. $table->timestamps();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. *
  27. * @return void
  28. */
  29. public function down()
  30. {
  31. Schema::dropIfExists('wallet_logs');
  32. }
  33. }