2020_12_14_144025_create_inner_devices_table.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateInnerDevicesTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('inner_devices', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('name', 200)->nullable();
  17. $table->unsignedInteger('device_id')->comment('设备类型ID')->nullable();
  18. $table->unsignedInteger('spec_id')->comment('规格型号ID')->nullable();
  19. $table->tinyInteger('status')->comment('状态1闲置中,2使用中,3故障')->nullable();
  20. $table->string('number', 200)->nullable()->comment('固定资产编号');
  21. $table->date('produce_date')->nullable()->comment('出厂日期');
  22. $table->string('shape', 200)->nullable()->comment('外形尺寸');
  23. $table->string('buy_origin', 200)->nullable()->comment('采购原值');
  24. $table->string('manufacturer', 200)->nullable()->comment('生产厂家');
  25. $table->date('start_date')->nullable()->comment('借用时间');
  26. $table->date('end_date')->nullable()->comment('借用时间');
  27. $table->timestamps();
  28. });
  29. }
  30. /**
  31. * Reverse the migrations.
  32. *
  33. * @return void
  34. */
  35. public function down()
  36. {
  37. Schema::dropIfExists('inner_devices');
  38. }
  39. }