2017_11_16_142024_create_goods_table.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. use Illuminate\Support\Facades\Schema;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Database\Migrations\Migration;
  5. class CreateGoodsTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('goods', function (Blueprint $table) {
  15. $table->increments('id');
  16. $table->string('name')->comment('品种名称');
  17. $table->string('standard')->nullable()->comment('规格');
  18. $table->string('package')->nullbale()->comment('包装比例');
  19. $table->string('product_name')->nullable()->comment('产品类型');
  20. $table->string('product_pici')->nullable()->comment('产品批次');
  21. $table->text('remark')->nullable()->comment('备注');
  22. $table->string('operator')->nullable()->comment('生产经营者');
  23. $table->string('skey')->nullable()->comment('单元识别码(首部添加)');
  24. $table->integer('bit')->default(12)->comment('单元识别码的位数(不包括首部添加)');
  25. // $table->string('product_name')->nullable()->comment('产品类型');
  26. // $table->string('product_pici')->nullable()->comment('产品批次');
  27. // $table->string('product_baozhuang')->nullable()->comment('包装级别');
  28. $table->string('consignor')->nullable()->comment('发货商');
  29. $table->date('delivery_time')->nullable()->comment('发货时间');
  30. $table->string('dealer')->nullable()->comment('经销商');
  31. $table->string('product_area')->nullable()->comment('产地');
  32. $table->string('process_pici')->nullable()->comment('加工批次');
  33. $table->string('higher_key')->nullable()->comment('上级码');
  34. $table->text('data')->nullable()->comment('扩展字段');
  35. $table->string('number')->comment('数量');
  36. $table->string('group')->nullable()->comment('分组单位');
  37. $table->integer('look_count')->default(0)->comment('查看的次数');
  38. $table->string('templet')->default(0)->comment('页面模板');
  39. $table->string('is_key', 8)->default('F')->comment('是否生成过key');
  40. $table->timestamps();
  41. });
  42. }
  43. /**
  44. * Reverse the migrations.
  45. *
  46. * @return void
  47. */
  48. public function down()
  49. {
  50. Schema::dropIfExists('goods');
  51. }
  52. }