Browse Source

antgoods_category删除icon_type字段

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
9d098ef89b
  1. 20
      vendor/antgoods/goods/src/migrations/m191125_083820_drop_column_icon_type_in_table_antgoods_category.php
  2. 6
      vendor/antgoods/goods/src/models/ars/Category.php

20
vendor/antgoods/goods/src/migrations/m191125_083820_drop_column_icon_type_in_table_antgoods_category.php

@ -0,0 +1,20 @@
<?php
use yii\db\Migration;
/**
* Class m191125_083820_drop_column_icon_type_in_table_antgoods_category
*/
class m191125_083820_drop_column_icon_type_in_table_antgoods_category extends Migration
{
public function up()
{
$this->dropColumn('antgoods_category', 'icon_type');
}
public function down()
{
$this->addColumn('antgoods_category', 'icon_type', $this->tinyInteger(1)->defaultValue(null)->comment('图标类型'));
return true;
}
}

6
vendor/antgoods/goods/src/models/ars/Category.php

@ -13,7 +13,6 @@ use yii\behaviors\TimestampBehavior;
* @property int $pid 父级id
* @property int $goods_count 商品数量
* @property int $sort_order 排序
* @property int $icon_type 图标类型
* @property string $icon 图标
* @property int $is_show 是否显示,1为不显示
* @property int $is_delete 是否删除,1为已删除
@ -22,6 +21,8 @@ use yii\behaviors\TimestampBehavior;
*/
class Category extends \yii\db\ActiveRecord
{
public $iconImageId;
public $iconImagePath;
//是否显示is_show
const IS_SHOW_DISPLAY = 0;//显示
const IS_SHOW_HIDE = 1;//隐藏
@ -49,9 +50,10 @@ class Category extends \yii\db\ActiveRecord
{
return [
[['name'], 'required'],
[['pid', 'goods_count', 'sort_order', 'icon_type', 'is_show', 'is_delete'], 'integer'],
[['pid', 'goods_count', 'sort_order', 'is_show', 'is_delete'], 'integer'],
[['name'], 'string', 'max' => 60],
[['icon'], 'string', 'max' => 64],
[['iconImageId'], 'string'],
];
}

Loading…
Cancel
Save