linyaostalker
5 years ago
7 changed files with 78 additions and 61 deletions
-
0backend/modules/shop/Module.php
-
4backend/modules/shop/controllers/ExpressTemplateController.php
-
30backend/modules/shop/migrations/m191205_062533_update_columns_basic_amount_extra_amount_calculation_in_table_ats_express_template.php
-
47backend/modules/shop/models/ars/ExpressTemplate.php
-
8backend/modules/shop/models/searchs/ExpressTemplateSearch.php
-
40backend/modules/shop/views/express-template/_form.php
-
8backend/modules/shop/views/express-template/view.php
@ -0,0 +1,30 @@ |
|||||
|
<?php |
||||
|
|
||||
|
use yii\db\Migration; |
||||
|
|
||||
|
/** |
||||
|
* Class m191205_062533_update_columns_basic_amount_extra_amount_calculation_in_table_ats_express_template |
||||
|
*/ |
||||
|
class m191205_062533_update_columns_basic_amount_extra_amount_calculation_in_table_ats_express_template extends Migration |
||||
|
{ |
||||
|
public function up() |
||||
|
{ |
||||
|
$this->dropColumn('ats_express_template', 'basic_amount'); |
||||
|
$this->dropColumn('ats_express_template', 'extra_amount'); |
||||
|
$this->dropColumn('ats_express_template', 'calculation'); |
||||
|
$this->addColumn('ats_express_template', 'basic_count', $this->integer(20)->defaultValue(null)->comment('基本数量')); |
||||
|
$this->addColumn('ats_express_template', 'extra_count', $this->integer(20)->defaultValue(null)->comment('续重数量')); |
||||
|
$this->addColumn('ats_express_template', 'calculation_type', $this->tinyInteger(2)->defaultValue(0)->comment('计算方式')); |
||||
|
} |
||||
|
|
||||
|
public function down() |
||||
|
{ |
||||
|
$this->dropColumn('ats_express_template', 'basic_amount'); |
||||
|
$this->dropColumn('ats_express_template', 'extra_amount'); |
||||
|
$this->dropColumn('ats_express_template', 'calculation'); |
||||
|
$this->addColumn('ats_express_template', 'basic_amount', $this->integer(20)->defaultValue(null)->comment('基本数量')); |
||||
|
$this->addColumn('ats_express_template', 'extra_amount', $this->integer(20)->defaultValue(null)->comment('续重数量')); |
||||
|
$this->addColumn('ats_express_template', 'calculation', $this->tinyInteger(2)->defaultValue(0)->comment('计算方式')); |
||||
|
return true; |
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue