Browse Source

将antgoods修改为goods

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
38bb2a5e9e
  1. 22
      antgoods/migrations/m191125_012449_update_column_icon_type_in_antgoods_category.php
  2. 20
      antgoods/migrations/m191125_083820_drop_column_icon_type_in_table_antgoods_category.php
  3. 26
      antgoods/migrations/m191125_084547_update_column_pid_and_icon_in_table_antgoods_category.php
  4. 20
      antgoods/migrations/m191125_104137_drop_column_icon_type_in_table_antgoods_shop_category.php
  5. 26
      antgoods/migrations/m191125_104510_update_column_pid_and_icon_in_table_antgoods_shop_category.php
  6. 20
      antgoods/migrations/m191127_114228_add_column_is_manaul_in_table_antgoods_goods_sku.php
  7. 20
      antgoods/migrations/m191129_010349_add_column_sku_mode_in_antgoods_goods.php
  8. 26
      antgoods/migrations/m191129_020131_add_columns_goods_id_and_attr_id_in_table_antgoods_goods_attr.php
  9. 20
      antgoods/migrations/m191130_004933_add_column_cat_id_in_table_antgoods_attribute.php
  10. 27
      antgoods/migrations/m191202_082041_drop_columns_in_table_antgoods_goods_sku.php
  11. 6
      backend/config/main.php
  12. 12
      backend/views/layouts/sidebar.php
  13. 6
      goods/Module.php
  14. 0
      goods/assets/custom/sku.49a56a9198d9c3ec233c.js
  15. 0
      goods/assets/custom/sku.52802ed907a316501cd7.js
  16. 0
      goods/assets/custom/sku.9a46222d01b3d601e5ad.js
  17. 0
      goods/assets/custom/sku_item.6649e882bedbeb22ea3d.js
  18. 0
      goods/assets/js/jquery.js
  19. 6
      goods/controllers/AttributeController.php
  20. 6
      goods/controllers/BrandController.php
  21. 8
      goods/controllers/CategoryController.php
  22. 14
      goods/controllers/GoodsController.php
  23. 8
      goods/controllers/ShopCategoryController.php
  24. 6
      goods/controllers/SupplierController.php
  25. 14
      goods/logic/goods/GoodsManager.php
  26. 4
      goods/migrations/m191119_021851_create_table_shop_category.php
  27. 4
      goods/migrations/m191119_022641_create_table_category.php
  28. 4
      goods/migrations/m191119_022939_create_table_attribute.php
  29. 4
      goods/migrations/m191119_023115_create_table_goods_attr.php
  30. 4
      goods/migrations/m191119_024029_create_table_brand.php
  31. 2
      goods/migrations/m191119_024205_create_table_goods.php
  32. 2
      goods/migrations/m191119_024345_create_table_goods_sku.php
  33. 4
      goods/migrations/m191119_025607_create_table_supplier.php
  34. 4
      goods/migrations/m191119_025843_create_table_filter_attr.php
  35. 22
      goods/migrations/m191125_012449_update_column_icon_type_in_atg_category.php
  36. 20
      goods/migrations/m191125_083820_drop_column_icon_type_in_table_atg_category.php
  37. 26
      goods/migrations/m191125_084547_update_column_pid_and_icon_in_table_atg_category.php
  38. 20
      goods/migrations/m191125_104137_drop_column_icon_type_in_table_atg_shop_category.php
  39. 26
      goods/migrations/m191125_104510_update_column_pid_and_icon_in_table_atg_shop_category.php
  40. 20
      goods/migrations/m191127_114228_add_column_is_manaul_in_table_atg_goods_sku.php
  41. 20
      goods/migrations/m191129_010349_add_column_sku_mode_in_atg_goods.php
  42. 26
      goods/migrations/m191129_020131_add_columns_goods_id_and_attr_id_in_table_atg_goods_attr.php
  43. 20
      goods/migrations/m191130_004933_add_column_cat_id_in_table_atg_attribute.php
  44. 27
      goods/migrations/m191202_082041_drop_columns_in_table_atg_goods_sku.php
  45. 4
      goods/migrations/sql/goods.sql
  46. 4
      goods/migrations/sql/goods_sku.sql
  47. 8
      goods/models/ars/Attribute.php
  48. 6
      goods/models/ars/Brand.php
  49. 6
      goods/models/ars/Category.php
  50. 6
      goods/models/ars/FilterAttr.php
  51. 14
      goods/models/ars/Goods.php
  52. 6
      goods/models/ars/GoodsAttr.php
  53. 6
      goods/models/ars/GoodsSku.php
  54. 6
      goods/models/ars/ShopCategory.php
  55. 8
      goods/models/ars/Supplier.php
  56. 6
      goods/models/searchs/AttributeSearch.php
  57. 6
      goods/models/searchs/BrandSearch.php
  58. 6
      goods/models/searchs/CategorySearch.php
  59. 10
      goods/models/searchs/GoodsSearch.php
  60. 6
      goods/models/searchs/ShopCategorySearch.php
  61. 6
      goods/models/searchs/SupplierSearch.php
  62. 4
      goods/views/attribute/_form.php
  63. 0
      goods/views/attribute/_search.php
  64. 2
      goods/views/attribute/create.php
  65. 0
      goods/views/attribute/index.php
  66. 2
      goods/views/attribute/update.php
  67. 2
      goods/views/attribute/view.php
  68. 2
      goods/views/brand/_form.php
  69. 0
      goods/views/brand/_search.php
  70. 2
      goods/views/brand/create.php
  71. 0
      goods/views/brand/index.php
  72. 2
      goods/views/brand/update.php
  73. 2
      goods/views/brand/view.php
  74. 4
      goods/views/category/_form.php
  75. 0
      goods/views/category/_search.php
  76. 2
      goods/views/category/create.php
  77. 0
      goods/views/category/index.php
  78. 2
      goods/views/category/update.php
  79. 4
      goods/views/category/view.php
  80. 0
      goods/views/config/index.php
  81. 10
      goods/views/goods/_form.php
  82. 0
      goods/views/goods/_search.php
  83. 4
      goods/views/goods/attribute.php
  84. 2
      goods/views/goods/create.php
  85. 4
      goods/views/goods/filter_attribute.php
  86. 12
      goods/views/goods/goods.php
  87. 0
      goods/views/goods/index.php
  88. 0
      goods/views/goods/new_editor.php
  89. 2
      goods/views/goods/picture.php
  90. 2
      goods/views/goods/sku_edit.php
  91. 2
      goods/views/goods/update.php
  92. 4
      goods/views/goods/view.php
  93. 6
      goods/views/shop-category/_form.php
  94. 0
      goods/views/shop-category/_search.php
  95. 2
      goods/views/shop-category/create.php
  96. 0
      goods/views/shop-category/index.php
  97. 2
      goods/views/shop-category/update.php
  98. 6
      goods/views/shop-category/view.php
  99. 2
      goods/views/supplier/_form.php
  100. 0
      goods/views/supplier/_search.php

22
antgoods/migrations/m191125_012449_update_column_icon_type_in_antgoods_category.php

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

20
antgoods/migrations/m191125_083820_drop_column_icon_type_in_table_antgoods_category.php

@ -1,20 +0,0 @@
<?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;
}
}

26
antgoods/migrations/m191125_084547_update_column_pid_and_icon_in_table_antgoods_category.php

@ -1,26 +0,0 @@
<?php
use yii\db\Migration;
/**
* Class m191125_084547_update_column_pid_and_icon_in_table_antgoods_category
*/
class m191125_084547_update_column_pid_and_icon_in_table_antgoods_category extends Migration
{
public function up()
{
$this->dropColumn('antgoods_category', 'icon');
$this->addColumn('antgoods_category', 'icon', $this->integer(11)->defaultValue(null)->comment('图标'));
$this->dropColumn('antgoods_category', 'pid');
$this->addColumn('antgoods_category', 'pid', $this->integer(11)->defaultValue(0)->comment('父级id'));
}
public function down()
{
$this->dropColumn('antgoods_category', 'icon');
$this->addColumn('antgoods_category', 'icon', $this->string(64)->defaultValue(null)->comment('图标'));
$this->dropColumn('antgoods_category', 'pid');
$this->addColumn('antgoods_category', 'pid', $this->integer(11)->defaultValue(null)->comment('父级id'));
return true;
}
}

20
antgoods/migrations/m191125_104137_drop_column_icon_type_in_table_antgoods_shop_category.php

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

26
antgoods/migrations/m191125_104510_update_column_pid_and_icon_in_table_antgoods_shop_category.php

@ -1,26 +0,0 @@
<?php
use yii\db\Migration;
/**
* Class m191125_104510_update_column_pid_and_icon_in_table_antgoods_shop_category
*/
class m191125_104510_update_column_pid_and_icon_in_table_antgoods_shop_category extends Migration
{
public function up()
{
$this->dropColumn('antgoods_shop_category', 'icon');
$this->addColumn('antgoods_shop_category', 'icon', $this->integer(11)->defaultValue(null)->comment('图标'));
$this->dropColumn('antgoods_shop_category', 'pid');
$this->addColumn('antgoods_shop_category', 'pid', $this->integer(11)->defaultValue(0)->comment('父级id'));
}
public function down()
{
$this->dropColumn('antgoods_shop_category', 'icon');
$this->addColumn('antgoods_shop_category', 'icon', $this->string(64)->defaultValue(null)->comment('图标'));
$this->dropColumn('antgoods_shop_category', 'pid');
$this->addColumn('antgoods_shop_category', 'pid', $this->integer(11)->defaultValue(null)->comment('父级id'));
return true;
}
}

20
antgoods/migrations/m191127_114228_add_column_is_manaul_in_table_antgoods_goods_sku.php

@ -1,20 +0,0 @@
<?php
use yii\db\Migration;
/**
* Class m191127_114228_add_column_is_manaul_in_table_antgoods_goods_sku
*/
class m191127_114228_add_column_is_manaul_in_table_antgoods_goods_sku extends Migration
{
public function up()
{
$this->addColumn('antgoods_goods_sku', 'is_manaul', $this->tinyInteger(1)->notNull()->defaultValue(0)->comment('是否手动'));
}
public function down()
{
$this->dropColumn('antgoods_goods_sku', 'is_manaul');
return true;
}
}

20
antgoods/migrations/m191129_010349_add_column_sku_mode_in_antgoods_goods.php

@ -1,20 +0,0 @@
<?php
use yii\db\Migration;
/**
* Class m191129_010349_add_column_sku_mode_in_antgoods_goods
*/
class m191129_010349_add_column_sku_mode_in_antgoods_goods extends Migration
{
public function up()
{
$this->addColumn('antgoods_goods', 'sku_mode', $this->tinyInteger(1)->notNull()->defaultValue(1)->comment('sku类型'));
}
public function down()
{
$this->dropColumn('antgoods_goods', 'sku_mode');
return true;
}
}

26
antgoods/migrations/m191129_020131_add_columns_goods_id_and_attr_id_in_table_antgoods_goods_attr.php

@ -1,26 +0,0 @@
<?php
use yii\db\Migration;
/**
* Class m191129_020131_add_columns_goods_id_and_attr_id_in_table_antgoods_goods_attr
*/
class m191129_020131_add_columns_goods_id_and_attr_id_in_table_antgoods_goods_attr extends Migration
{
public function up()
{
$this->dropColumn('antgoods_goods_attr', 'goods_id');
$this->dropColumn('antgoods_goods_attr', 'attr_id');
$this->addColumn('antgoods_goods_attr', 'goods_id', $this->integer(11)->notNull()->defaultValue(0)->comment('商品id'));
$this->addColumn('antgoods_goods_attr', 'attr_id', $this->integer(11)->notNull()->defaultValue(0)->comment('属性id'));
}
public function down()
{
$this->dropColumn('antgoods_goods_attr', 'goods_id');
$this->dropColumn('antgoods_goods_attr', 'attr_id');
$this->addColumn('antgoods_goods_attr', 'goods_id', $this->integer(11)->notNull()->comment('商品id'));
$this->addColumn('antgoods_goods_attr', 'attr_id', $this->integer(11)->notNull()->comment('属性id'));
return true;
}
}

20
antgoods/migrations/m191130_004933_add_column_cat_id_in_table_antgoods_attribute.php

@ -1,20 +0,0 @@
<?php
use yii\db\Migration;
/**
* Class m191130_004933_add_column_cat_id_in_table_antgoods_attribute
*/
class m191130_004933_add_column_cat_id_in_table_antgoods_attribute extends Migration
{
public function up()
{
$this->addColumn('antgoods_attribute', 'cat_id', $this->integer(11)->notNull()->defaultValue(0)->comment('后台商品分类id'));
}
public function down()
{
$this->dropColumn('antgoods_attribute', 'cat_id');
return true;
}
}

27
antgoods/migrations/m191202_082041_drop_columns_in_table_antgoods_goods_sku.php

@ -1,27 +0,0 @@
<?php
use yii\db\Migration;
/**
* Class m191202_082041_drop_columns_in_table_antgoods_goods_sku
*/
class m191202_082041_drop_columns_in_table_antgoods_goods_sku extends Migration
{
public function up()
{
$this->dropColumn('antgoods_goods_sku', 'weight');
$this->dropColumn('antgoods_goods_sku', 'length');
$this->dropColumn('antgoods_goods_sku', 'width');
$this->dropColumn('antgoods_goods_sku', 'height');
$this->dropColumn('antgoods_goods_sku', 'diameter');
}
public function down()
{
$this->addColumn('antgoods_goods_sku', 'weight', $this->integer(8)->defaultValue(null)->comment('重量'));
$this->addColumn('antgoods_goods_sku', 'length', $this->integer(8)->defaultValue(null)->comment('长度'));
$this->addColumn('antgoods_goods_sku', 'width', $this->integer(8)->defaultValue(null)->comment('宽度'));
$this->addColumn('antgoods_goods_sku', 'height', $this->integer(8)->defaultValue(null)->comment('高度'));
$this->addColumn('antgoods_goods_sku', 'diameter', $this->integer(8)->defaultValue(null)->comment('直径'));
}
}

6
backend/config/main.php

@ -10,8 +10,8 @@ return [
'controllerNamespace' => 'backend\controllers',
'bootstrap' => ['log'],
'modules' => [
'antgoods' => [
'class' => 'antgoods\Module',
'goods' => [
'class' => 'goods\Module',
],
],
'components' => [
@ -59,7 +59,7 @@ return [
],
],
'file' => ['class' => 'backend\logic\file\FileManager'],
'goods' => ['class' => 'antgoods\goods\logic\goods\GoodsManager'],
'goods' => ['class' => 'goods\goods\logic\goods\GoodsManager'],
],
'params' => $params,
];

12
backend/views/layouts/sidebar.php

@ -21,12 +21,12 @@ use iron\widgets\Menu;
]
],
['label' => '商品管理', 'url' => '#', 'icon' => 'far fa-box', 'items' => [
['label' => '后台商品分类', 'url' => ['/antgoods/category/index']],
['label' => '规格管理', 'url' => ['/antgoods/attribute/index']],
['label' => '前端商品分类', 'url' => ['/antgoods/shop-category/index']],
['label' => '品牌管理', 'url' => ['/antgoods/brand/index']],
['label' => '供应商管理', 'url' => ['/antgoods/supplier/index']],
['label' => '商品列表', 'url' => ['/antgoods/goods/index']],
['label' => '后台商品分类', 'url' => ['/goods/category/index']],
['label' => '规格管理', 'url' => ['/goods/attribute/index']],
['label' => '前端商品分类', 'url' => ['/goods/shop-category/index']],
['label' => '品牌管理', 'url' => ['/goods/brand/index']],
['label' => '供应商管理', 'url' => ['/goods/supplier/index']],
['label' => '商品列表', 'url' => ['/goods/goods/index']],
]
],
['label' => '订单管理', 'url' => '#', 'icon' => 'far fa-list-alt', 'items' => [

antgoods/Module.php → goods/Module.php

antgoods/assets/custom/sku.49a56a9198d9c3ec233c.js → goods/assets/custom/sku.49a56a9198d9c3ec233c.js

antgoods/assets/custom/sku.52802ed907a316501cd7.js → goods/assets/custom/sku.52802ed907a316501cd7.js

antgoods/assets/custom/sku.9a46222d01b3d601e5ad.js → goods/assets/custom/sku.9a46222d01b3d601e5ad.js

antgoods/assets/custom/sku_item.6649e882bedbeb22ea3d.js → goods/assets/custom/sku_item.6649e882bedbeb22ea3d.js

antgoods/assets/js/jquery.js → goods/assets/js/jquery.js

antgoods/controllers/AttributeController.php → goods/controllers/AttributeController.php

antgoods/controllers/BrandController.php → goods/controllers/BrandController.php

antgoods/controllers/CategoryController.php → goods/controllers/CategoryController.php

antgoods/controllers/GoodsController.php → goods/controllers/GoodsController.php

antgoods/controllers/ShopCategoryController.php → goods/controllers/ShopCategoryController.php

antgoods/controllers/SupplierController.php → goods/controllers/SupplierController.php

antgoods/logic/goods/GoodsManager.php → goods/logic/goods/GoodsManager.php

antgoods/migrations/m191119_021851_create_table_shop_category.php → goods/migrations/m191119_021851_create_table_shop_category.php

antgoods/migrations/m191119_022641_create_table_category.php → goods/migrations/m191119_022641_create_table_category.php

antgoods/migrations/m191119_022939_create_table_attribute.php → goods/migrations/m191119_022939_create_table_attribute.php

antgoods/migrations/m191119_023115_create_table_goods_attr.php → goods/migrations/m191119_023115_create_table_goods_attr.php

antgoods/migrations/m191119_024029_create_table_brand.php → goods/migrations/m191119_024029_create_table_brand.php

antgoods/migrations/m191119_024205_create_table_goods.php → goods/migrations/m191119_024205_create_table_goods.php

antgoods/migrations/m191119_024345_create_table_goods_sku.php → goods/migrations/m191119_024345_create_table_goods_sku.php

antgoods/migrations/m191119_025607_create_table_supplier.php → goods/migrations/m191119_025607_create_table_supplier.php

antgoods/migrations/m191119_025843_create_table_filter_attr.php → goods/migrations/m191119_025843_create_table_filter_attr.php

22
goods/migrations/m191125_012449_update_column_icon_type_in_atg_category.php

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

20
goods/migrations/m191125_083820_drop_column_icon_type_in_table_atg_category.php

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

26
goods/migrations/m191125_084547_update_column_pid_and_icon_in_table_atg_category.php

@ -0,0 +1,26 @@
<?php
use yii\db\Migration;
/**
* Class m191125_084547_update_column_pid_and_icon_in_table_atg_category
*/
class m191125_084547_update_column_pid_and_icon_in_table_atg_category extends Migration
{
public function up()
{
$this->dropColumn('atg_category', 'icon');
$this->addColumn('atg_category', 'icon', $this->integer(11)->defaultValue(null)->comment('图标'));
$this->dropColumn('atg_category', 'pid');
$this->addColumn('atg_category', 'pid', $this->integer(11)->defaultValue(0)->comment('父级id'));
}
public function down()
{
$this->dropColumn('atg_category', 'icon');
$this->addColumn('atg_category', 'icon', $this->string(64)->defaultValue(null)->comment('图标'));
$this->dropColumn('atg_category', 'pid');
$this->addColumn('atg_category', 'pid', $this->integer(11)->defaultValue(null)->comment('父级id'));
return true;
}
}

20
goods/migrations/m191125_104137_drop_column_icon_type_in_table_atg_shop_category.php

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

26
goods/migrations/m191125_104510_update_column_pid_and_icon_in_table_atg_shop_category.php

@ -0,0 +1,26 @@
<?php
use yii\db\Migration;
/**
* Class m191125_104510_update_column_pid_and_icon_in_table_atg_shop_category
*/
class m191125_104510_update_column_pid_and_icon_in_table_atg_shop_category extends Migration
{
public function up()
{
$this->dropColumn('atg_shop_category', 'icon');
$this->addColumn('atg_shop_category', 'icon', $this->integer(11)->defaultValue(null)->comment('图标'));
$this->dropColumn('atg_shop_category', 'pid');
$this->addColumn('atg_shop_category', 'pid', $this->integer(11)->defaultValue(0)->comment('父级id'));
}
public function down()
{
$this->dropColumn('atg_shop_category', 'icon');
$this->addColumn('atg_shop_category', 'icon', $this->string(64)->defaultValue(null)->comment('图标'));
$this->dropColumn('atg_shop_category', 'pid');
$this->addColumn('atg_shop_category', 'pid', $this->integer(11)->defaultValue(null)->comment('父级id'));
return true;
}
}

20
goods/migrations/m191127_114228_add_column_is_manaul_in_table_atg_goods_sku.php

@ -0,0 +1,20 @@
<?php
use yii\db\Migration;
/**
* Class m191127_114228_add_column_is_manaul_in_table_atg_goods_sku
*/
class m191127_114228_add_column_is_manaul_in_table_atg_goods_sku extends Migration
{
public function up()
{
$this->addColumn('atg_goods_sku', 'is_manaul', $this->tinyInteger(1)->notNull()->defaultValue(0)->comment('是否手动'));
}
public function down()
{
$this->dropColumn('atg_goods_sku', 'is_manaul');
return true;
}
}

20
goods/migrations/m191129_010349_add_column_sku_mode_in_atg_goods.php

@ -0,0 +1,20 @@
<?php
use yii\db\Migration;
/**
* Class m191129_010349_add_column_sku_mode_in_atg_goods
*/
class m191129_010349_add_column_sku_mode_in_atg_goods extends Migration
{
public function up()
{
$this->addColumn('atg_goods', 'sku_mode', $this->tinyInteger(1)->notNull()->defaultValue(1)->comment('sku类型'));
}
public function down()
{
$this->dropColumn('atg_goods', 'sku_mode');
return true;
}
}

26
goods/migrations/m191129_020131_add_columns_goods_id_and_attr_id_in_table_atg_goods_attr.php

@ -0,0 +1,26 @@
<?php
use yii\db\Migration;
/**
* Class m191129_020131_add_columns_goods_id_and_attr_id_in_table_atg_goods_attr
*/
class m191129_020131_add_columns_goods_id_and_attr_id_in_table_atg_goods_attr extends Migration
{
public function up()
{
$this->dropColumn('atg_goods_attr', 'goods_id');
$this->dropColumn('atg_goods_attr', 'attr_id');
$this->addColumn('atg_goods_attr', 'goods_id', $this->integer(11)->notNull()->defaultValue(0)->comment('商品id'));
$this->addColumn('atg_goods_attr', 'attr_id', $this->integer(11)->notNull()->defaultValue(0)->comment('属性id'));
}
public function down()
{
$this->dropColumn('atg_goods_attr', 'goods_id');
$this->dropColumn('atg_goods_attr', 'attr_id');
$this->addColumn('atg_goods_attr', 'goods_id', $this->integer(11)->notNull()->comment('商品id'));
$this->addColumn('atg_goods_attr', 'attr_id', $this->integer(11)->notNull()->comment('属性id'));
return true;
}
}

20
goods/migrations/m191130_004933_add_column_cat_id_in_table_atg_attribute.php

@ -0,0 +1,20 @@
<?php
use yii\db\Migration;
/**
* Class m191130_004933_add_column_cat_id_in_table_atg_attribute
*/
class m191130_004933_add_column_cat_id_in_table_atg_attribute extends Migration
{
public function up()
{
$this->addColumn('atg_attribute', 'cat_id', $this->integer(11)->notNull()->defaultValue(0)->comment('后台商品分类id'));
}
public function down()
{
$this->dropColumn('atg_attribute', 'cat_id');
return true;
}
}

27
goods/migrations/m191202_082041_drop_columns_in_table_atg_goods_sku.php

@ -0,0 +1,27 @@
<?php
use yii\db\Migration;
/**
* Class m191202_082041_drop_columns_in_table_atg_goods_sku
*/
class m191202_082041_drop_columns_in_table_atg_goods_sku extends Migration
{
public function up()
{
$this->dropColumn('atg_goods_sku', 'weight');
$this->dropColumn('atg_goods_sku', 'length');
$this->dropColumn('atg_goods_sku', 'width');
$this->dropColumn('atg_goods_sku', 'height');
$this->dropColumn('atg_goods_sku', 'diameter');
}
public function down()
{
$this->addColumn('atg_goods_sku', 'weight', $this->integer(8)->defaultValue(null)->comment('重量'));
$this->addColumn('atg_goods_sku', 'length', $this->integer(8)->defaultValue(null)->comment('长度'));
$this->addColumn('atg_goods_sku', 'width', $this->integer(8)->defaultValue(null)->comment('宽度'));
$this->addColumn('atg_goods_sku', 'height', $this->integer(8)->defaultValue(null)->comment('高度'));
$this->addColumn('atg_goods_sku', 'diameter', $this->integer(8)->defaultValue(null)->comment('直径'));
}
}

antgoods/migrations/sql/goods.sql → goods/migrations/sql/goods.sql

antgoods/migrations/sql/goods_sku.sql → goods/migrations/sql/goods_sku.sql

antgoods/models/ars/Attribute.php → goods/models/ars/Attribute.php

antgoods/models/ars/Brand.php → goods/models/ars/Brand.php

antgoods/models/ars/Category.php → goods/models/ars/Category.php

antgoods/models/ars/FilterAttr.php → goods/models/ars/FilterAttr.php

antgoods/models/ars/Goods.php → goods/models/ars/Goods.php

antgoods/models/ars/GoodsAttr.php → goods/models/ars/GoodsAttr.php

antgoods/models/ars/GoodsSku.php → goods/models/ars/GoodsSku.php

antgoods/models/ars/ShopCategory.php → goods/models/ars/ShopCategory.php

antgoods/models/ars/Supplier.php → goods/models/ars/Supplier.php

antgoods/models/searchs/AttributeSearch.php → goods/models/searchs/AttributeSearch.php

antgoods/models/searchs/BrandSearch.php → goods/models/searchs/BrandSearch.php

antgoods/models/searchs/CategorySearch.php → goods/models/searchs/CategorySearch.php

antgoods/models/searchs/GoodsSearch.php → goods/models/searchs/GoodsSearch.php

antgoods/models/searchs/ShopCategorySearch.php → goods/models/searchs/ShopCategorySearch.php

antgoods/models/searchs/SupplierSearch.php → goods/models/searchs/SupplierSearch.php

antgoods/views/attribute/_form.php → goods/views/attribute/_form.php

antgoods/views/attribute/_search.php → goods/views/attribute/_search.php

antgoods/views/attribute/create.php → goods/views/attribute/create.php

antgoods/views/attribute/index.php → goods/views/attribute/index.php

antgoods/views/attribute/update.php → goods/views/attribute/update.php

antgoods/views/attribute/view.php → goods/views/attribute/view.php

antgoods/views/brand/_form.php → goods/views/brand/_form.php

antgoods/views/brand/_search.php → goods/views/brand/_search.php

antgoods/views/brand/create.php → goods/views/brand/create.php

antgoods/views/brand/index.php → goods/views/brand/index.php

antgoods/views/brand/update.php → goods/views/brand/update.php

antgoods/views/brand/view.php → goods/views/brand/view.php

antgoods/views/category/_form.php → goods/views/category/_form.php

antgoods/views/category/_search.php → goods/views/category/_search.php

antgoods/views/category/create.php → goods/views/category/create.php

antgoods/views/category/index.php → goods/views/category/index.php

antgoods/views/category/update.php → goods/views/category/update.php

antgoods/views/category/view.php → goods/views/category/view.php

antgoods/views/config/index.php → goods/views/config/index.php

antgoods/views/goods/_form.php → goods/views/goods/_form.php

antgoods/views/goods/_search.php → goods/views/goods/_search.php

antgoods/views/goods/attribute.php → goods/views/goods/attribute.php

antgoods/views/goods/create.php → goods/views/goods/create.php

antgoods/views/goods/filter_attribute.php → goods/views/goods/filter_attribute.php

antgoods/views/goods/goods.php → goods/views/goods/goods.php

antgoods/views/goods/index.php → goods/views/goods/index.php

antgoods/views/goods/new_editor.php → goods/views/goods/new_editor.php

antgoods/views/goods/picture.php → goods/views/goods/picture.php

antgoods/views/goods/sku_edit.php → goods/views/goods/sku_edit.php

antgoods/views/goods/update.php → goods/views/goods/update.php

antgoods/views/goods/view.php → goods/views/goods/view.php

antgoods/views/shop-category/_form.php → goods/views/shop-category/_form.php

antgoods/views/shop-category/_search.php → goods/views/shop-category/_search.php

antgoods/views/shop-category/create.php → goods/views/shop-category/create.php

antgoods/views/shop-category/index.php → goods/views/shop-category/index.php

antgoods/views/shop-category/update.php → goods/views/shop-category/update.php

antgoods/views/shop-category/view.php → goods/views/shop-category/view.php

antgoods/views/supplier/_form.php → goods/views/supplier/_form.php

antgoods/views/supplier/_search.php → goods/views/supplier/_search.php

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save