1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateGoodsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('goods', function (Blueprint $table) {
- $table->increments('id');
- $table->string('name')->comment('品种名称');
- $table->string('standard')->nullable()->comment('规格');
- $table->string('package')->nullbale()->comment('包装比例');
- $table->string('product_name')->nullable()->comment('产品类型');
- $table->string('product_pici')->nullable()->comment('产品批次');
- $table->text('remark')->nullable()->comment('备注');
- $table->string('operator')->nullable()->comment('生产经营者');
- $table->string('skey')->nullable()->comment('单元识别码(首部添加)');
- $table->integer('bit')->default(12)->comment('单元识别码的位数(不包括首部添加)');
- // $table->string('product_name')->nullable()->comment('产品类型');
- // $table->string('product_pici')->nullable()->comment('产品批次');
- // $table->string('product_baozhuang')->nullable()->comment('包装级别');
- $table->string('consignor')->nullable()->comment('发货商');
- $table->date('delivery_time')->nullable()->comment('发货时间');
- $table->string('dealer')->nullable()->comment('经销商');
- $table->string('product_area')->nullable()->comment('产地');
- $table->string('process_pici')->nullable()->comment('加工批次');
- $table->string('higher_key')->nullable()->comment('上级码');
- $table->text('data')->nullable()->comment('扩展字段');
- $table->string('number')->comment('数量');
- $table->string('group')->nullable()->comment('分组单位');
- $table->integer('look_count')->default(0)->comment('查看的次数');
- $table->string('templet')->default(0)->comment('页面模板');
- $table->string('is_key', 8)->default('F')->comment('是否生成过key');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('goods');
- }
- }
|