2019_05_08_160636_create_members_table.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. class CreateMembersTable extends Migration {
  5. /**
  6. * Run the migrations.
  7. *
  8. * @return void
  9. */
  10. public function up()
  11. {
  12. Schema::create('members', function(Blueprint $table)
  13. {
  14. $table->increments('id');
  15. $table->string('phone', 100)->unique('phone')->comment('手机');
  16. $table->string('name', 50)->unique('username')->comment('昵称');
  17. $table->string('password')->comment('密码');
  18. $table->string('avatar')->nullable()->comment('头像');
  19. $table->string('remember_token', 150)->nullable()->comment('记住我');
  20. $table->char('uuid', 36);
  21. $table->softDeletes();
  22. $table->timestamps();
  23. $table->binary('status')->nullable()->comment('状态:1=正常,0=禁用');
  24. $table->decimal('amount', 25, 4)->default(0.0000)->comment('金额');
  25. $table->decimal('frozen_amount', 25, 4)->default(0.0000)->comment('冻结额度');
  26. $table->string('solt', 20)->nullable()->comment('盐');
  27. });
  28. }
  29. /**
  30. * Reverse the migrations.
  31. *
  32. * @return void
  33. */
  34. public function down()
  35. {
  36. Schema::drop('members');
  37. }
  38. }