2018_01_24_233537_create_power_table.php
1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePowerTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('power', function (Blueprint $table) {
            $table->increments('id');
            $table->string('power_no')->comment('充电宝编号');
            $table->integer('has_power')->default(0)->unsigned()->comment('充电宝电量');
            $table->tinyInteger('status')->default(1)->unsigned()->comment('充电宝状态1在仓库2在机柜可用3在机柜占用4出货成功');
            $table->tinyInteger('is_miss')->default(0)->unsigned()->comment('是否丢失0未丢1丢失');
            $table->integer('machine_id')->nullable()->unsigned()->comment('机柜id');
            $table->tinyInteger('hatch_no')->nullable()->unsigned()->comment('机柜仓口号');
            $table->timestamps();
        });
    }
    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('power');
    }
}