|
@@ -1,10 +1,9 @@
|
|
|
<?php
|
|
<?php
|
|
|
declare(strict_types=1);
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
-use think\migration\db\Column;
|
|
|
|
|
-use think\migration\Migrator;
|
|
|
|
|
|
|
+use Phinx\Migration\AbstractMigration;
|
|
|
|
|
|
|
|
-class Wuliu extends Migrator
|
|
|
|
|
|
|
+class Wuliu extends AbstractMigration
|
|
|
{
|
|
{
|
|
|
/**
|
|
/**
|
|
|
* Change Method.
|
|
* Change Method.
|
|
@@ -78,16 +77,15 @@ class Wuliu extends Migrator
|
|
|
$table
|
|
$table
|
|
|
->addColumn('number', 'string', ['limit' => 50, 'default' => '', 'comment' => '快递单号'])
|
|
->addColumn('number', 'string', ['limit' => 50, 'default' => '', 'comment' => '快递单号'])
|
|
|
->addColumn('type', 'string', ['limit' => 32, 'default' => '', 'comment' => '快递公司'])
|
|
->addColumn('type', 'string', ['limit' => 32, 'default' => '', 'comment' => '快递公司'])
|
|
|
- ->addColumn('list', 'json', ['default' => '[]', 'comment' => '物流信息'])
|
|
|
|
|
- ->addColumn(Column::tinyInteger('delivery_status')->setUnsigned()->setDefault(0)
|
|
|
|
|
- ->setComment('物流状态 0:快递收件(揽件)1.在途中 2.正在派件 3.已签收 4.派送失败 5.疑难件 6.退件签收' ))
|
|
|
|
|
- ->addColumn(Column::tinyInteger('is_sign')->setUnsigned()->setDefault(0)->setComment('是否签收'))
|
|
|
|
|
|
|
+ ->addColumn('list', 'json', ['null' => true, 'comment' => '物流信息'])
|
|
|
|
|
+ ->addColumn('delivery_status', 'tinyinteger', ['signed' => false, 'default' => 0, 'comment' => '物流状态 0:快递收件(揽件)1.在途中 2.正在派件 3.已签收 4.派送失败 5.疑难件 6.退件签收'])
|
|
|
|
|
+ ->addColumn('is_sign', 'tinyinteger', ['signed' => false, 'default' => 0, 'comment' => '是否签收'])
|
|
|
->addColumn('exp_name', 'string', ['limit' => 100, 'default' => '', 'comment' => '快递公司名称'])
|
|
->addColumn('exp_name', 'string', ['limit' => 100, 'default' => '', 'comment' => '快递公司名称'])
|
|
|
->addColumn('exp_site', 'string', ['limit' => 255, 'default' => '', 'comment' => '快递公司官网'])
|
|
->addColumn('exp_site', 'string', ['limit' => 255, 'default' => '', 'comment' => '快递公司官网'])
|
|
|
->addColumn('exp_phone', 'string', ['limit' => 32, 'default' => '', 'comment' => '快递公司电话'])
|
|
->addColumn('exp_phone', 'string', ['limit' => 32, 'default' => '', 'comment' => '快递公司电话'])
|
|
|
->addColumn('courier', 'string', ['limit' => 32, 'default' => '', 'comment' => '快递员'])
|
|
->addColumn('courier', 'string', ['limit' => 32, 'default' => '', 'comment' => '快递员'])
|
|
|
->addColumn('courier_phone', 'string', ['limit' => 32, 'default' => '', 'comment' => '快递员电话'])
|
|
->addColumn('courier_phone', 'string', ['limit' => 32, 'default' => '', 'comment' => '快递员电话'])
|
|
|
- ->addColumn(Column::string('take_time')->setDefault('')->setComment('发货到收货消耗时长'))
|
|
|
|
|
|
|
+ ->addColumn('take_time', 'string', ['limit' => 32, 'default' => '', 'comment' => '发货到收货消耗时长'])
|
|
|
->addColumn('logo', 'string', ['limit' => 255, 'default' => '', 'comment' => '快递公司LOGO'])
|
|
->addColumn('logo', 'string', ['limit' => 255, 'default' => '', 'comment' => '快递公司LOGO'])
|
|
|
->addTimestamps()
|
|
->addTimestamps()
|
|
|
->addIndex('number')
|
|
->addIndex('number')
|