From 8ba1b9474ee1e3d491be98e4a3afed7e84cd2cca Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Tue, 19 Nov 2019 14:57:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/models/ars/Address.php | 86 ------------- common/models/ars/AfterSale.php | 78 ------------ common/models/ars/Area.php | 50 -------- common/models/ars/Cart.php | 82 ------------ common/models/ars/City.php | 50 -------- common/models/ars/Collection.php | 71 ----------- common/models/ars/Comment.php | 78 ------------ common/models/ars/Delivery.php | 84 ------------- common/models/ars/ExpressTemplate.php | 93 -------------- common/models/ars/File.php | 85 ------------- common/models/ars/Order.php | 119 ------------------ common/models/ars/OrderGoods.php | 84 ------------- common/models/ars/PaymentLog.php | 84 ------------- common/models/ars/Province.php | 48 ------- common/models/ars/RefundLog.php | 70 ----------- common/models/ars/SearchHistory.php | 78 ------------ common/models/ars/TakingSite.php | 82 ------------ common/models/ars/TemFile.php | 79 ------------ console/migrations/m130524_201442_init.php | 0 .../migrations/m140506_102106_rbac_init.php | 0 ...c_add_index_on_auth_assignment_user_id.php | 0 ...38_rbac_updates_indexes_without_prefix.php | 0 ...erification_token_column_to_user_table.php | 0 .../m190802_072830_add_category.php | 0 .../m191111_101658_create_table_area.php | 0 .../m191111_102644_create_table_province.php | 0 .../m191111_102730_create_table_city.php | 0 .../m191111_102925_create_table_cart.php | 8 +- .../m191111_112559_create_table_address.php | 8 +- ...m191111_113455_create_table_after_sale.php | 6 +- ...112_005106_create_table_search_history.php | 2 +- ...m191112_005545_create_table_collection.php | 4 +- .../m191112_005702_create_table_comment.php | 2 +- .../m191112_010421_create_table_order.php | 2 +- ...191112_011517_create_table_order_goods.php | 4 +- ...191112_012449_create_table_taking_site.php | 2 +- ...2_014508_create_table_express_template.php | 2 +- .../m191112_015939_create_table_delivery.php | 2 +- ...191112_020830_create_table_payment_log.php | 0 ...m191112_021528_create_table_refund_log.php | 0 .../m191112_022131_create_table_file.php | 0 .../m191112_022532_create_table_tem_file.php | 0 console/migrations/schema-mysql.sql | 0 console/migrations/sql/add_category.sql | 0 console/migrations/sql/area.sql | 0 console/migrations/sql/city.sql | 0 console/migrations/sql/province.sql | 0 ...1119_021851_create_table_shop_category.php | 6 +- .../m191119_022641_create_table_category.php | 10 +- .../m191119_022939_create_table_attribute.php | 4 +- ...m191119_023115_create_table_goods_attr.php | 6 +- .../m191119_024029_create_table_brand.php | 2 +- .../m191119_025607_create_table_supplier.php | 8 +- ...191119_025843_create_table_filter_attr.php | 6 +- .../goods/src/migrations/sql/goods.sql | 10 +- .../goods/src/migrations/sql/goods_sku.sql | 6 +- .../goods/src/models/ars/Attribute.php | 79 ------------ .../antgoods/goods/src/models/ars/Brand.php | 72 ----------- .../goods/src/models/ars/Category.php | 85 ------------- .../goods/src/models/ars/FilterAttr.php | 76 ----------- .../goods/src/models/ars/GoodsAttr.php | 76 ----------- .../goods/src/models/ars/GoodsSku.php | 103 --------------- .../goods/src/models/ars/ShopCategory.php | 94 -------------- .../goods/src/models/ars/Supplier.php | 79 ------------ 64 files changed, 50 insertions(+), 2115 deletions(-) delete mode 100644 common/models/ars/Address.php delete mode 100644 common/models/ars/AfterSale.php delete mode 100644 common/models/ars/Area.php delete mode 100644 common/models/ars/Cart.php delete mode 100644 common/models/ars/City.php delete mode 100644 common/models/ars/Collection.php delete mode 100644 common/models/ars/Comment.php delete mode 100644 common/models/ars/Delivery.php delete mode 100644 common/models/ars/ExpressTemplate.php delete mode 100644 common/models/ars/File.php delete mode 100644 common/models/ars/Order.php delete mode 100644 common/models/ars/OrderGoods.php delete mode 100644 common/models/ars/PaymentLog.php delete mode 100644 common/models/ars/Province.php delete mode 100644 common/models/ars/RefundLog.php delete mode 100644 common/models/ars/SearchHistory.php delete mode 100644 common/models/ars/TakingSite.php delete mode 100644 common/models/ars/TemFile.php mode change 100644 => 100755 console/migrations/m130524_201442_init.php mode change 100644 => 100755 console/migrations/m140506_102106_rbac_init.php mode change 100644 => 100755 console/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php mode change 100644 => 100755 console/migrations/m180523_151638_rbac_updates_indexes_without_prefix.php mode change 100644 => 100755 console/migrations/m190124_110200_add_verification_token_column_to_user_table.php mode change 100644 => 100755 console/migrations/m190802_072830_add_category.php mode change 100644 => 100755 console/migrations/m191111_101658_create_table_area.php mode change 100644 => 100755 console/migrations/m191111_102644_create_table_province.php mode change 100644 => 100755 console/migrations/m191111_102730_create_table_city.php mode change 100644 => 100755 console/migrations/m191111_102925_create_table_cart.php mode change 100644 => 100755 console/migrations/m191111_112559_create_table_address.php mode change 100644 => 100755 console/migrations/m191111_113455_create_table_after_sale.php mode change 100644 => 100755 console/migrations/m191112_005106_create_table_search_history.php mode change 100644 => 100755 console/migrations/m191112_005545_create_table_collection.php mode change 100644 => 100755 console/migrations/m191112_005702_create_table_comment.php mode change 100644 => 100755 console/migrations/m191112_010421_create_table_order.php mode change 100644 => 100755 console/migrations/m191112_011517_create_table_order_goods.php mode change 100644 => 100755 console/migrations/m191112_012449_create_table_taking_site.php mode change 100644 => 100755 console/migrations/m191112_014508_create_table_express_template.php mode change 100644 => 100755 console/migrations/m191112_015939_create_table_delivery.php mode change 100644 => 100755 console/migrations/m191112_020830_create_table_payment_log.php mode change 100644 => 100755 console/migrations/m191112_021528_create_table_refund_log.php mode change 100644 => 100755 console/migrations/m191112_022131_create_table_file.php mode change 100644 => 100755 console/migrations/m191112_022532_create_table_tem_file.php mode change 100644 => 100755 console/migrations/schema-mysql.sql mode change 100644 => 100755 console/migrations/sql/add_category.sql mode change 100644 => 100755 console/migrations/sql/area.sql mode change 100644 => 100755 console/migrations/sql/city.sql mode change 100644 => 100755 console/migrations/sql/province.sql delete mode 100755 vendor/antgoods/goods/src/models/ars/Attribute.php delete mode 100755 vendor/antgoods/goods/src/models/ars/Brand.php delete mode 100755 vendor/antgoods/goods/src/models/ars/Category.php delete mode 100755 vendor/antgoods/goods/src/models/ars/FilterAttr.php delete mode 100755 vendor/antgoods/goods/src/models/ars/GoodsAttr.php delete mode 100755 vendor/antgoods/goods/src/models/ars/GoodsSku.php delete mode 100755 vendor/antgoods/goods/src/models/ars/ShopCategory.php delete mode 100755 vendor/antgoods/goods/src/models/ars/Supplier.php diff --git a/common/models/ars/Address.php b/common/models/ars/Address.php deleted file mode 100644 index b7b9ad9..0000000 --- a/common/models/ars/Address.php +++ /dev/null @@ -1,86 +0,0 @@ - 20], - [['province', 'city', 'area'], 'string', 'max' => 10], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'user_id' => '用户id', - 'consignee' => '收件人', - 'phone' => '电话', - 'province' => '省份', - 'city' => '城市', - 'area' => '区域', - 'address' => '详细地址', - 'status' => '状态,0-默认值 1-默认地址', - 'created_at' => '创建时间', - 'updated_at' => '更新时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/common/models/ars/AfterSale.php b/common/models/ars/AfterSale.php deleted file mode 100644 index 4f0cced..0000000 --- a/common/models/ars/AfterSale.php +++ /dev/null @@ -1,78 +0,0 @@ - 64], - [['take_shipping_sn', 'send_shipping_sn'], 'string', 'max' => 50], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'operator_id' => '操作者', - 'user_id' => '用户id', - 'wx_refund_id' => '微信退款单号', - 'after_sale_sn' => '售后单号', - 'order_goods_id' => '订单商品id', - 'count' => '退换货的商品数量', - 'amount' => '退货时实际退的金额', - 'type' => '类型', - 'reason' => '退换货理由', - 'description' => '描述', - 'take_shipping_sn' => '用户发货物流单号', - 'send_shipping_sn' => '换货商家发货的物流单号', - 'remarks' => '店家备注', - 'applyed_at' => '申请时间', - 'dealed_at' => '处理时间', - 'finished_at' => '完成时间', - ]; - } - -} diff --git a/common/models/ars/Area.php b/common/models/ars/Area.php deleted file mode 100644 index e42ee4f..0000000 --- a/common/models/ars/Area.php +++ /dev/null @@ -1,50 +0,0 @@ - 32], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'name' => 'name', - 'area_id' => 'area_id', - 'city_id' => 'city_id', - ]; - } - -} diff --git a/common/models/ars/Cart.php b/common/models/ars/Cart.php deleted file mode 100644 index 3af30be..0000000 --- a/common/models/ars/Cart.php +++ /dev/null @@ -1,82 +0,0 @@ - 120], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'user_id' => '用户id', - 'goods_id' => '商品id', - 'goods_name' => '商品名称', - 'goods_img' => '商品图片', - 'goods_price' => '商品售价', - 'sku_id' => '商品sku的id', - 'goods_count' => '商品数量', - 'created_at' => '创建时间', - 'updated_at' => '更新时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/common/models/ars/City.php b/common/models/ars/City.php deleted file mode 100644 index 3b4096f..0000000 --- a/common/models/ars/City.php +++ /dev/null @@ -1,50 +0,0 @@ - 32], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'city_id' => 'city_id', - 'name' => 'name', - 'province_id' => 'province_id', - ]; - } - -} diff --git a/common/models/ars/Collection.php b/common/models/ars/Collection.php deleted file mode 100644 index 69937f3..0000000 --- a/common/models/ars/Collection.php +++ /dev/null @@ -1,71 +0,0 @@ - 'id', - 'user_id' => '用户id', - 'goods_id' => '商品id', - 'updated_at' => '更新时间', - 'created_at' => '创建时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/common/models/ars/Comment.php b/common/models/ars/Comment.php deleted file mode 100644 index 2fe43aa..0000000 --- a/common/models/ars/Comment.php +++ /dev/null @@ -1,78 +0,0 @@ - 'id', - 'user_id' => '用户id', - 'order_goods_id' => '订单详情商品id', - 'star' => '星级', - 'content' => '评论内容', - 'status' => '状态:1为显示,0为不显示', - 'updated_at' => '更新时间', - 'created_at' => '创建时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/common/models/ars/Delivery.php b/common/models/ars/Delivery.php deleted file mode 100644 index e9760bd..0000000 --- a/common/models/ars/Delivery.php +++ /dev/null @@ -1,84 +0,0 @@ - 50], - [['shipping_id'], 'string', 'max' => 10], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'order_id' => '订单id', - 'shipping_name' => '货流名称', - 'shipping_id' => '运货单位', - 'type' => '类型', - 'goods' => '商品', - 'status' => '状态', - 'decription' => '描述', - 'updated_at' => '更新时间', - 'created_at' => '创建时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/common/models/ars/ExpressTemplate.php b/common/models/ars/ExpressTemplate.php deleted file mode 100644 index d91b966..0000000 --- a/common/models/ars/ExpressTemplate.php +++ /dev/null @@ -1,93 +0,0 @@ - 255], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'name' => '名称', - 'province' => '省份', - 'city' => '城市', - 'area' => '区域', - 'billing_type' => '账单类型', - 'extra_weight_type' => '续重重量类型', - 'exemption_type' => '包邮类型', - 'basic_price' => '基本运费', - 'extra_price' => '续重运费', - 'exemption_amount' => '包邮金额', - 'support_taking' => '是否支持自提,1为不支持', - 'taking_site' => '自提地点', - 'updated_at' => '更新时间', - 'created_at' => '创建时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/common/models/ars/File.php b/common/models/ars/File.php deleted file mode 100644 index c58b34e..0000000 --- a/common/models/ars/File.php +++ /dev/null @@ -1,85 +0,0 @@ - 255], - [['alias'], 'string', 'max' => 50], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'pid' => '父级id', - 'name' => '名称', - 'type' => '类型', - 'own_type' => '拥有者类型', - 'own_id' => '拥有者id', - 'alias' => '别名', - 'path' => '地址', - 'is_delete' => '是否删除,1为已删除', - 'updated_at' => '更新时间', - 'created_at' => '创建时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/common/models/ars/Order.php b/common/models/ars/Order.php deleted file mode 100644 index c74f2b0..0000000 --- a/common/models/ars/Order.php +++ /dev/null @@ -1,119 +0,0 @@ - 64], - [['consignee', 'phone'], 'string', 'max' => 20], - [['province', 'city', 'area'], 'string', 'max' => 10], - [['payment_sn'], 'string', 'max' => 120], - [['remarks'], 'string', 'max' => 255], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'user_id' => '用户id', - 'order_sn' => '订单号', - 'invoice_id' => '发票单号', - 'status' => '状态', - 'type' => '类型', - 'goods_count' => '商品数量', - 'goods_amount' => '商品金额', - 'shipping_amount' => '物流金额', - 'shipping_type' => '物流类型', - 'consignee' => '收件人', - 'phone' => '手机号码', - 'province' => '省份', - 'city' => '城市', - 'area' => '区域', - 'taking_site' => '自提点', - 'pay_type' => '支付方式', - 'pay_at' => '支付时间', - 'payment_sn' => '付款单号', - 'payment_amount' => '支付金额', - 'receivables' => '应收款', - 'remarks' => '备注', - 'discount_amount' => '折扣金额', - 'discount_decription' => '折扣说明', - 'updated_at' => '更新时间', - 'created_at' => '创建时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/common/models/ars/OrderGoods.php b/common/models/ars/OrderGoods.php deleted file mode 100644 index f98ceea..0000000 --- a/common/models/ars/OrderGoods.php +++ /dev/null @@ -1,84 +0,0 @@ - 120], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'order_id' => '订单id', - 'goods_id' => '商品id', - 'goods_img' => '商品图片', - 'goods_name' => '商品名称', - 'goods_count' => '商品数量', - 'sku_value' => '商品sku', - 'price' => '销售价', - 'market_price' => '市场价', - 'updated_at' => '更新时间', - 'created_at' => '创建时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/common/models/ars/PaymentLog.php b/common/models/ars/PaymentLog.php deleted file mode 100644 index ad85810..0000000 --- a/common/models/ars/PaymentLog.php +++ /dev/null @@ -1,84 +0,0 @@ - 64], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'order_id' => '订单id', - 'wx_refund_id' => '微信退款单号', - 'mch_id' => '商户号', - 'order_amount' => '订单金额', - 'payment_amount' => '支付金额', - 'type' => '类型', - 'status' => '状态', - 'refund_account' => '退款账户', - 'updated_at' => '更新时间', - 'created_at' => '创建时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/common/models/ars/Province.php b/common/models/ars/Province.php deleted file mode 100644 index 26506c4..0000000 --- a/common/models/ars/Province.php +++ /dev/null @@ -1,48 +0,0 @@ - 16], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'name' => 'name', - 'province_id' => 'province_id', - ]; - } - -} diff --git a/common/models/ars/RefundLog.php b/common/models/ars/RefundLog.php deleted file mode 100644 index 9f281b8..0000000 --- a/common/models/ars/RefundLog.php +++ /dev/null @@ -1,70 +0,0 @@ - 64], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'order_id' => '订单id', - 'wx_refund_id' => '微信退款单号', - 'reason' => '理由', - 'order_amount' => '订单金额', - 'refund_amount' => '退款金额', - 'refunded_amount' => '已退款金额', - 'type' => '类型', - 'status' => '状态', - 'refund_account' => '退款账户', - 'operator_id' => '操作者', - 'applyed_at' => '申请时间', - 'confirmed_at' => '确认时间', - 'finished_at' => '完成时间', - ]; - } - -} diff --git a/common/models/ars/SearchHistory.php b/common/models/ars/SearchHistory.php deleted file mode 100644 index 6be7b5f..0000000 --- a/common/models/ars/SearchHistory.php +++ /dev/null @@ -1,78 +0,0 @@ - 255], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'user_id' => '用户id', - 'keyword' => '关键字', - 'count' => '次数', - 'status' => '状态', - 'type' => '类型', - 'updated_at' => '更新时间', - 'created_at' => '创建时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/common/models/ars/TakingSite.php b/common/models/ars/TakingSite.php deleted file mode 100644 index f147e62..0000000 --- a/common/models/ars/TakingSite.php +++ /dev/null @@ -1,82 +0,0 @@ - 120], - [['province', 'city', 'area'], 'string', 'max' => 10], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'name' => '名称', - 'province' => '省份', - 'city' => '城市', - 'area' => '区域', - 'address' => '地址', - 'is_default' => '是否为默认,1为默认', - 'updated_at' => '更新时间', - 'created_at' => '创建时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/common/models/ars/TemFile.php b/common/models/ars/TemFile.php deleted file mode 100644 index df9bab0..0000000 --- a/common/models/ars/TemFile.php +++ /dev/null @@ -1,79 +0,0 @@ - 255], - [['alias'], 'string', 'max' => 50], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'user_id' => '父级id', - 'name' => '名称', - 'type' => '类型', - 'alias' => '别名', - 'path' => '地址', - 'updated_at' => '更新时间', - 'created_at' => '创建时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/console/migrations/m130524_201442_init.php b/console/migrations/m130524_201442_init.php old mode 100644 new mode 100755 diff --git a/console/migrations/m140506_102106_rbac_init.php b/console/migrations/m140506_102106_rbac_init.php old mode 100644 new mode 100755 diff --git a/console/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php b/console/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php old mode 100644 new mode 100755 diff --git a/console/migrations/m180523_151638_rbac_updates_indexes_without_prefix.php b/console/migrations/m180523_151638_rbac_updates_indexes_without_prefix.php old mode 100644 new mode 100755 diff --git a/console/migrations/m190124_110200_add_verification_token_column_to_user_table.php b/console/migrations/m190124_110200_add_verification_token_column_to_user_table.php old mode 100644 new mode 100755 diff --git a/console/migrations/m190802_072830_add_category.php b/console/migrations/m190802_072830_add_category.php old mode 100644 new mode 100755 diff --git a/console/migrations/m191111_101658_create_table_area.php b/console/migrations/m191111_101658_create_table_area.php old mode 100644 new mode 100755 diff --git a/console/migrations/m191111_102644_create_table_province.php b/console/migrations/m191111_102644_create_table_province.php old mode 100644 new mode 100755 diff --git a/console/migrations/m191111_102730_create_table_city.php b/console/migrations/m191111_102730_create_table_city.php old mode 100644 new mode 100755 diff --git a/console/migrations/m191111_102925_create_table_cart.php b/console/migrations/m191111_102925_create_table_cart.php old mode 100644 new mode 100755 index 5c81c47..bea2e27 --- a/console/migrations/m191111_102925_create_table_cart.php +++ b/console/migrations/m191111_102925_create_table_cart.php @@ -15,12 +15,12 @@ class m191111_102925_create_table_cart extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="购物车表"'; $this->createTable('ats_cart', [ 'id' => $this->primaryKey(), - 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'), - 'goods_id'=>$this->integer(11)->defaultValue(null)->comment('商品id'), - 'goods_name'=>$this->string(120)->defaultValue(null)->comment('商品名称'), + 'user_id'=>$this->integer(11)->notNull()->comment('用户id'), + 'goods_id'=>$this->integer(11)->notNull()->comment('商品id'), + 'goods_name'=>$this->string(120)->notNull()->comment('商品名称'), 'goods_img'=>$this->integer(11)->defaultValue(null)->comment('商品图片'), 'goods_price'=>$this->integer(20)->defaultValue(null)->comment('商品售价'), - 'sku_id'=>$this->integer(11)->defaultValue(null)->comment('商品sku的id'), + 'sku_id'=>$this->integer(11)->notNull()->comment('商品sku的id'), 'goods_count'=>$this->integer(11)->defaultValue(null)->comment('商品数量'), 'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'), 'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'), diff --git a/console/migrations/m191111_112559_create_table_address.php b/console/migrations/m191111_112559_create_table_address.php old mode 100644 new mode 100755 index 2882b5c..ab94279 --- a/console/migrations/m191111_112559_create_table_address.php +++ b/console/migrations/m191111_112559_create_table_address.php @@ -15,13 +15,13 @@ class m191111_112559_create_table_address extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="地址表"'; $this->createTable('ats_address', [ 'id' => $this->primaryKey(), - 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'), - 'consignee'=>$this->string(20)->defaultValue(null)->comment('收件人'), - 'phone'=>$this->string(20)->defaultValue(null)->comment('电话'), + 'user_id'=>$this->integer(11)->notNull()->comment('用户id'), + 'consignee'=>$this->string(20)->notNull()->comment('收件人'), + 'phone'=>$this->string(20)->notNull()->comment('电话'), 'province'=>$this->string(10)->defaultValue(null)->comment('省份'), 'city'=>$this->string(10)->defaultValue(null)->comment('城市'), 'area'=>$this->string(10)->defaultValue(null)->comment('区域'), - 'address'=>$this->text()->comment('详细地址'), + 'address'=>$this->text()->notNull()->comment('详细地址'), 'status'=>$this->tinyInteger(1)->defaultValue(0)->comment('状态,0-默认值 1-默认地址'), 'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'), 'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'), diff --git a/console/migrations/m191111_113455_create_table_after_sale.php b/console/migrations/m191111_113455_create_table_after_sale.php old mode 100644 new mode 100755 index fde56b1..56a71ae --- a/console/migrations/m191111_113455_create_table_after_sale.php +++ b/console/migrations/m191111_113455_create_table_after_sale.php @@ -15,13 +15,13 @@ class m191111_113455_create_table_after_sale extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="售后表"'; $this->createTable('ats_after_sale', [ 'id' => $this->primaryKey(), - 'operator_id'=>$this->integer(11)->defaultValue(null)->comment('操作者'), - 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'), + 'operator_id'=>$this->integer(11)->notNull()->comment('操作者'), + 'user_id'=>$this->integer(11)->notNull()->comment('用户id'), 'wx_refund_id'=>$this->string(64)->defaultValue(null)->comment('微信退款单号'), 'after_sale_sn'=>$this->string(64)->defaultValue(null)->comment('售后单号'), 'order_goods_id'=>$this->integer(11)->defaultValue(null)->comment('订单商品id'), 'count'=>$this->integer(11)->defaultValue(null)->comment('退换货的商品数量'), - 'amount'=>$this->integer(20)->defaultValue(null)->comment('退货时实际退的金额'), + 'amount'=>$this->integer(20)->notNull()->comment('退货时实际退的金额'), 'type'=>$this->tinyInteger(1)->defaultValue(0)->comment('类型'), 'reason'=>$this->smallInteger(2)->defaultValue(0)->comment('退换货理由'), 'description'=>$this->text()->comment('描述'), diff --git a/console/migrations/m191112_005106_create_table_search_history.php b/console/migrations/m191112_005106_create_table_search_history.php old mode 100644 new mode 100755 index e54e8ba..54736ec --- a/console/migrations/m191112_005106_create_table_search_history.php +++ b/console/migrations/m191112_005106_create_table_search_history.php @@ -15,7 +15,7 @@ class m191112_005106_create_table_search_history extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="搜索记录表"'; $this->createTable('ats_search_history', [ 'id' => $this->primaryKey(), - 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'), + 'user_id'=>$this->integer(11)->notNull()->comment('用户id'), 'keyword'=>$this->string(255)->defaultValue(null)->comment('关键字'), 'count'=>$this->integer(10)->defaultValue(null)->comment('次数'), 'status'=>$this->tinyInteger(1)->defaultValue(0)->comment('状态'), diff --git a/console/migrations/m191112_005545_create_table_collection.php b/console/migrations/m191112_005545_create_table_collection.php old mode 100644 new mode 100755 index 13492eb..e4fb1e7 --- a/console/migrations/m191112_005545_create_table_collection.php +++ b/console/migrations/m191112_005545_create_table_collection.php @@ -15,8 +15,8 @@ class m191112_005545_create_table_collection extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="收藏表"'; $this->createTable('ats_collection', [ 'id' => $this->primaryKey(), - 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'), - 'goods_id'=>$this->integer(11)->defaultValue(null)->comment('商品id'), + 'user_id'=>$this->integer(11)->notNull()->comment('用户id'), + 'goods_id'=>$this->integer(11)->notNull()->comment('商品id'), 'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'), 'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'), ],$tableOptions); diff --git a/console/migrations/m191112_005702_create_table_comment.php b/console/migrations/m191112_005702_create_table_comment.php old mode 100644 new mode 100755 index f3a1ddd..1fa7e2b --- a/console/migrations/m191112_005702_create_table_comment.php +++ b/console/migrations/m191112_005702_create_table_comment.php @@ -15,7 +15,7 @@ class m191112_005702_create_table_comment extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="评论记录表"'; $this->createTable('ats_comment', [ 'id' => $this->primaryKey(), - 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'), + 'user_id'=>$this->integer(11)->notNull()->comment('用户id'), 'order_goods_id'=>$this->integer(11)->defaultValue(null)->comment('订单详情商品id'), 'star'=>$this->integer(11)->defaultValue(null)->comment('星级'), 'content'=>$this->text()->comment('评论内容'), diff --git a/console/migrations/m191112_010421_create_table_order.php b/console/migrations/m191112_010421_create_table_order.php old mode 100644 new mode 100755 index dfd6a01..6bcfb06 --- a/console/migrations/m191112_010421_create_table_order.php +++ b/console/migrations/m191112_010421_create_table_order.php @@ -15,7 +15,7 @@ class m191112_010421_create_table_order extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="订单表"'; $this->createTable('ats_order', [ 'id' => $this->primaryKey(), - 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'), + 'user_id'=>$this->integer(11)->notNull()->comment('用户id'), 'order_sn'=>$this->string(64)->defaultValue(null)->comment('订单号'), 'invoice_id'=>$this->string(64)->defaultValue(null)->comment('发票单号'), 'status'=>$this->tinyInteger(2)->defaultValue(0)->comment('状态'), diff --git a/console/migrations/m191112_011517_create_table_order_goods.php b/console/migrations/m191112_011517_create_table_order_goods.php old mode 100644 new mode 100755 index 52974d1..3340d25 --- a/console/migrations/m191112_011517_create_table_order_goods.php +++ b/console/migrations/m191112_011517_create_table_order_goods.php @@ -15,8 +15,8 @@ class m191112_011517_create_table_order_goods extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="订单商品表"'; $this->createTable('ats_order_goods', [ 'id' => $this->primaryKey(), - 'order_id'=>$this->integer(11)->defaultValue(null)->comment('订单id'), - 'goods_id'=>$this->integer(11)->defaultValue(null)->comment('商品id'), + 'order_id'=>$this->integer(11)->notNull()->comment('订单id'), + 'goods_id'=>$this->integer(11)->notNull()->comment('商品id'), 'goods_img'=>$this->integer(11)->defaultValue(null)->comment('商品图片'), 'goods_name'=>$this->string(120)->defaultValue(null)->comment('商品名称'), 'goods_count'=>$this->integer(11)->defaultValue(null)->comment('商品数量'), diff --git a/console/migrations/m191112_012449_create_table_taking_site.php b/console/migrations/m191112_012449_create_table_taking_site.php old mode 100644 new mode 100755 index a9bc8e8..a03c9a6 --- a/console/migrations/m191112_012449_create_table_taking_site.php +++ b/console/migrations/m191112_012449_create_table_taking_site.php @@ -15,7 +15,7 @@ class m191112_012449_create_table_taking_site extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="自提地点表"'; $this->createTable('ats_taking_site', [ 'id' => $this->primaryKey(), - 'name'=>$this->string(120)->defaultValue(null)->comment('名称'), + 'name'=>$this->string(120)->notNull()->comment('名称'), 'province'=>$this->string(10)->defaultValue(null)->comment('省份'), 'city'=>$this->string(10)->defaultValue(null)->comment('城市'), 'area'=>$this->string(10)->defaultValue(null)->comment('区域'), diff --git a/console/migrations/m191112_014508_create_table_express_template.php b/console/migrations/m191112_014508_create_table_express_template.php old mode 100644 new mode 100755 index 83a1165..4b788a5 --- a/console/migrations/m191112_014508_create_table_express_template.php +++ b/console/migrations/m191112_014508_create_table_express_template.php @@ -15,7 +15,7 @@ class m191112_014508_create_table_express_template extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="配送情况设置表"'; $this->createTable('ats_express_template', [ 'id' => $this->primaryKey(), - 'name'=>$this->string(255)->defaultValue(null)->comment('名称'), + 'name'=>$this->string(255)->notNull()->comment('名称'), 'province'=>$this->text()->comment('省份'), 'city'=>$this->text()->comment('城市'), 'area'=>$this->text()->comment('区域'), diff --git a/console/migrations/m191112_015939_create_table_delivery.php b/console/migrations/m191112_015939_create_table_delivery.php old mode 100644 new mode 100755 index 92cd994..c90f0a1 --- a/console/migrations/m191112_015939_create_table_delivery.php +++ b/console/migrations/m191112_015939_create_table_delivery.php @@ -17,7 +17,7 @@ class m191112_015939_create_table_delivery extends Migration 'id' => $this->primaryKey(), 'order_id'=>$this->integer(11)->defaultValue(null)->comment('订单id'), 'shipping_name'=>$this->string(50)->defaultValue(null)->comment('货流名称'), - 'shipping_id'=>$this->string(10)->defaultValue(null)->comment('运货单位'), + 'shipping_id'=>$this->string(10)->notNull()->comment('运货单位'), 'type'=>$this->tinyInteger(1)->defaultValue(0)->comment('类型'), 'goods'=>$this->text()->comment('商品'), 'status'=>$this->tinyInteger(1)->defaultValue(0)->comment('状态'), diff --git a/console/migrations/m191112_020830_create_table_payment_log.php b/console/migrations/m191112_020830_create_table_payment_log.php old mode 100644 new mode 100755 diff --git a/console/migrations/m191112_021528_create_table_refund_log.php b/console/migrations/m191112_021528_create_table_refund_log.php old mode 100644 new mode 100755 diff --git a/console/migrations/m191112_022131_create_table_file.php b/console/migrations/m191112_022131_create_table_file.php old mode 100644 new mode 100755 diff --git a/console/migrations/m191112_022532_create_table_tem_file.php b/console/migrations/m191112_022532_create_table_tem_file.php old mode 100644 new mode 100755 diff --git a/console/migrations/schema-mysql.sql b/console/migrations/schema-mysql.sql old mode 100644 new mode 100755 diff --git a/console/migrations/sql/add_category.sql b/console/migrations/sql/add_category.sql old mode 100644 new mode 100755 diff --git a/console/migrations/sql/area.sql b/console/migrations/sql/area.sql old mode 100644 new mode 100755 diff --git a/console/migrations/sql/city.sql b/console/migrations/sql/city.sql old mode 100644 new mode 100755 diff --git a/console/migrations/sql/province.sql b/console/migrations/sql/province.sql old mode 100644 new mode 100755 diff --git a/vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php b/vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php index eabe634..35f536e 100644 --- a/vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php +++ b/vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php @@ -15,12 +15,12 @@ class m191119_021851_create_table_shop_category extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="前端商品类别表"'; $this->createTable('antgoods_shop_category', [ 'id' => $this->primaryKey(), - 'name'=>$this->string(60)->defaultValue(null)->comment('类别名称'), + 'name'=>$this->string(60)->notNull()->comment('类别名称'), 'pid'=>$this->integer(11)->defaultValue(null)->comment('父级id'), - 'goods_count'=>$this->integer(11)->defaultValue(null)->comment('商品数量'), + 'goods_count'=>$this->integer(11)->defaultValue(0)->comment('商品数量'), 'keywords'=>$this->string(100)->defaultValue(null)->comment('关键字'), 'desc'=>$this->string(255)->defaultValue(null)->comment('描述'), - 'sort_order'=>$this->smallInteger(3)->defaultValue(null)->comment('排序'), + 'sort_order'=>$this->smallInteger(3)->defaultValue(0)->comment('排序'), 'icon_type'=>$this->tinyInteger(1)->defaultValue(null)->comment('图标类型'), 'icon'=>$this->string(64)->defaultValue(null)->comment('图标'), 'filter_attr'=>$this->text()->comment('筛选属性'), diff --git a/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php b/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php index 4ba6c29..60dd21e 100644 --- a/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php +++ b/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php @@ -15,14 +15,14 @@ class m191119_022641_create_table_category extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="后台商品类别表"'; $this->createTable('antgoods_category', [ 'id' => $this->primaryKey(), - 'name'=>$this->string(60)->defaultValue(null)->comment('类别名称'), + 'name'=>$this->string(60)->notNull()->comment('类别名称'), 'pid'=>$this->integer(11)->defaultValue(null)->comment('父级id'), - 'goods_count'=>$this->integer(11)->defaultValue(null)->comment('商品数量'), - 'sort_order'=>$this->smallInteger(3)->defaultValue(null)->comment('排序'), + 'goods_count'=>$this->integer(11)->defaultValue(0)->comment('商品数量'), + 'sort_order'=>$this->smallInteger(3)->defaultValue(0)->comment('排序'), 'icon_type'=>$this->tinyInteger(1)->defaultValue(null)->comment('图标类型'), 'icon'=>$this->string(64)->defaultValue(null)->comment('图标'), - 'is_show'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否显示,1为不显示'), - 'is_delete'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否删除,1为已删除'), + 'is_show'=>$this->tinyInteger(1)->defaultValue(0)->comment('是否显示,1为不显示'), + 'is_delete'=>$this->tinyInteger(1)->defaultValue(0)->comment('是否删除,1为已删除'), 'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'), 'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'), ],$tableOptions); diff --git a/vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php b/vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php index df38219..cb2cad2 100644 --- a/vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php +++ b/vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php @@ -15,8 +15,8 @@ class m191119_022939_create_table_attribute extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="属性表"'; $this->createTable('antgoods_attribute', [ 'id' => $this->primaryKey(), - 'name'=>$this->string(50)->defaultValue(null)->comment('属性名'), - 'value'=>$this->text()->comment('属性值'), + 'name'=>$this->string(50)->notNull()->comment('属性名'), + 'value'=>$this->text()->notNull()->comment('属性值'), 'type'=>$this->smallInteger(2)->defaultValue(null)->comment('类型'), 'sort_order'=>$this->smallInteger(3)->defaultValue(null)->comment('排序'), 'is_delete'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否删除,1为已删除'), diff --git a/vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php b/vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php index 62e66aa..4f33089 100644 --- a/vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php +++ b/vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php @@ -15,9 +15,9 @@ class m191119_023115_create_table_goods_attr extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="商品属性表"'; $this->createTable('antgoods_goods_attr', [ 'id' => $this->primaryKey(), - 'goods_id'=>$this->integer(11)->defaultValue(null)->comment('商品id'), - 'attr_id'=>$this->integer(11)->defaultValue(null)->comment('属性id'), - 'attr_value'=>$this->string(50)->defaultValue(null)->comment('属性名'), + 'goods_id'=>$this->integer(11)->notNull()->comment('商品id'), + 'attr_id'=>$this->integer(11)->notNull()->comment('属性id'), + 'attr_value'=>$this->string(50)->notNull()->comment('属性名'), 'is_delete'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否删除,1为已删除'), 'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'), 'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'), diff --git a/vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php b/vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php index 615e9ea..f1d46ad 100644 --- a/vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php +++ b/vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php @@ -15,7 +15,7 @@ class m191119_024029_create_table_brand extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="品牌表"'; $this->createTable('antgoods_brand', [ 'id' => $this->primaryKey(), - 'name'=>$this->string(50)->defaultValue(null)->comment('品牌名'), + 'name'=>$this->string(50)->notNull()->comment('品牌名'), 'is_delete'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否删除,1为已删除'), 'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'), 'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'), diff --git a/vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php b/vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php index 60ccef4..c7d8f6c 100644 --- a/vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php +++ b/vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php @@ -15,10 +15,10 @@ class m191119_025607_create_table_supplier extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="供应商表"'; $this->createTable('antgoods_supplier', [ 'id' => $this->primaryKey(), - 'name'=>$this->string(50)->defaultValue(null)->comment('供应商名称'), - 'full_name'=>$this->string(50)->defaultValue(null)->comment('供应商全称'), - 'phone'=>$this->string(20)->defaultValue(null)->comment('手机号码'), - 'address'=>$this->string(50)->defaultValue(null)->comment('地址'), + 'name'=>$this->string(50)->notNull()->comment('供应商名称'), + 'full_name'=>$this->string(50)->notNull()->comment('供应商全称'), + 'phone'=>$this->string(20)->notNull()->comment('手机号码'), + 'address'=>$this->string(50)->notNull()->comment('地址'), 'is_delete'=>$this->tinyInteger(1)->defaultValue(0)->comment('是否删除,1为已删除'), 'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'), 'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'), diff --git a/vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php b/vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php index 5ab3f83..0409292 100644 --- a/vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php +++ b/vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php @@ -15,9 +15,9 @@ class m191119_025843_create_table_filter_attr extends Migration $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="筛选属性表"'; $this->createTable('antgoods_filter_attr', [ 'id' => $this->primaryKey(), - 'goods_id'=>$this->integer(11)->defaultValue(null)->comment('商品id'), - 'attr_id'=>$this->integer(11)->defaultValue(null)->comment('属性id'), - 'attr_value'=>$this->string(50)->defaultValue(null)->comment('属性值'), + 'goods_id'=>$this->integer(11)->notNull()->comment('商品id'), + 'attr_id'=>$this->integer(11)->notNull()->comment('属性id'), + 'attr_value'=>$this->string(50)->notNull()->comment('属性值'), 'is_delete'=>$this->tinyInteger(1)->defaultValue(0)->comment('是否删除,1为已删除'), 'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'), 'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'), diff --git a/vendor/antgoods/goods/src/migrations/sql/goods.sql b/vendor/antgoods/goods/src/migrations/sql/goods.sql index 238e7c9..f744a0b 100755 --- a/vendor/antgoods/goods/src/migrations/sql/goods.sql +++ b/vendor/antgoods/goods/src/migrations/sql/goods.sql @@ -2,11 +2,11 @@ DROP TABLE IF EXISTS `antgoods_goods`; CREATE TABLE `antgoods_goods` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pid` int(11) DEFAULT NULL COMMENT '父级id', - `cat_id` int(11) DEFAULT NULL COMMENT '后台商品类别id', - `brand_id` int(11) DEFAULT NULL COMMENT '品牌id', - `shop_cat_id` int(11) DEFAULT NULL COMMENT '前端商品类别id', - `name` varchar(120) DEFAULT NULL COMMENT '商品名称', - `sn` varchar(60) DEFAULT NULL COMMENT '商品唯一货号', + `cat_id` int(11) NOT NULL COMMENT '后台商品类别id', + `brand_id` int(11) NOT NULL COMMENT '品牌id', + `shop_cat_id` int(11) NOT NULL COMMENT '前端商品类别id', + `name` varchar(120) NOT NULL COMMENT '商品名称', + `sn` varchar(60) NOT NULL COMMENT '商品唯一货号', `code` varchar(50) DEFAULT NULL COMMENT '商品货码', `supplier_id` int(11) DEFAULT NULL COMMENT '供应商id', `weight` mediumint(8) DEFAULT NULL COMMENT '重量', diff --git a/vendor/antgoods/goods/src/migrations/sql/goods_sku.sql b/vendor/antgoods/goods/src/migrations/sql/goods_sku.sql index 478a19f..a599a39 100755 --- a/vendor/antgoods/goods/src/migrations/sql/goods_sku.sql +++ b/vendor/antgoods/goods/src/migrations/sql/goods_sku.sql @@ -1,9 +1,9 @@ DROP TABLE IF EXISTS `antgoods_goods_sku`; CREATE TABLE `antgoods_goods_sku` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `goods_id` int(11) DEFAULT NULL COMMENT '商品id', + `goods_id` int(11) NOT NULL COMMENT '商品id', `goods_code` varchar(50) DEFAULT NULL COMMENT '商品条码', - `goods_sn` varchar(60) DEFAULT NULL COMMENT '商品唯一货号', + `goods_sn` varchar(60) NOT NULL COMMENT '商品唯一货号', `goods_attr` varchar(60) DEFAULT NULL COMMENT '属性匹配', `weight` mediumint(8) DEFAULT NULL COMMENT '重量', `length` mediumint(8) DEFAULT NULL COMMENT '长度', @@ -16,7 +16,7 @@ CREATE TABLE `antgoods_goods_sku` ( `price` int(20) DEFAULT NULL COMMENT '销售价', `model_id` int(11) DEFAULT NULL COMMENT '模型id', `is_sale` tinyint(1) DEFAULT '0' COMMENT '该商品是否开放销售,1为是,0为否', - `sort_order` smallint(3) DEFAULT NULL COMMENT '排序', + `sort_order` smallint(3) DEFAULT '0' COMMENT '排序', `is_delete` tinyint(1) DEFAULT '0' COMMENT '是否删除,1为已删除', `created_at` int(10) DEFAULT '0' COMMENT '创建时间', `updated_at` int(10) DEFAULT '0' COMMENT '更新时间', diff --git a/vendor/antgoods/goods/src/models/ars/Attribute.php b/vendor/antgoods/goods/src/models/ars/Attribute.php deleted file mode 100755 index 7699897..0000000 --- a/vendor/antgoods/goods/src/models/ars/Attribute.php +++ /dev/null @@ -1,79 +0,0 @@ - 50], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'name' => '属性名', - 'value' => '属性值', - 'type' => '类型', - 'sort_order' => '排序', - 'is_delete' => '是否删除,1为已删除', - 'created_at' => '创建时间', - 'updated_at' => '更新时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/vendor/antgoods/goods/src/models/ars/Brand.php b/vendor/antgoods/goods/src/models/ars/Brand.php deleted file mode 100755 index aab9e05..0000000 --- a/vendor/antgoods/goods/src/models/ars/Brand.php +++ /dev/null @@ -1,72 +0,0 @@ - 50], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'name' => '品牌名', - 'is_delete' => '是否删除,1为已删除', - 'created_at' => '创建时间', - 'updated_at' => '更新时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/vendor/antgoods/goods/src/models/ars/Category.php b/vendor/antgoods/goods/src/models/ars/Category.php deleted file mode 100755 index e7e7938..0000000 --- a/vendor/antgoods/goods/src/models/ars/Category.php +++ /dev/null @@ -1,85 +0,0 @@ - 60], - [['icon'], 'string', 'max' => 64], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'name' => '类别名称', - 'pid' => '父级id', - 'goods_count' => '商品数量', - 'sort_order' => '排序', - 'icon_type' => '图标类型', - 'icon' => '图标', - 'is_show' => '是否显示,1为不显示', - 'is_delete' => '是否删除,1为已删除', - 'created_at' => '创建时间', - 'updated_at' => '更新时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/vendor/antgoods/goods/src/models/ars/FilterAttr.php b/vendor/antgoods/goods/src/models/ars/FilterAttr.php deleted file mode 100755 index 1e377f1..0000000 --- a/vendor/antgoods/goods/src/models/ars/FilterAttr.php +++ /dev/null @@ -1,76 +0,0 @@ - 50], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'goods_id' => '商品id', - 'attr_id' => '属性id', - 'attr_value' => '属性值', - 'is_delete' => '是否删除,1为已删除', - 'created_at' => '创建时间', - 'updated_at' => '更新时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/vendor/antgoods/goods/src/models/ars/GoodsAttr.php b/vendor/antgoods/goods/src/models/ars/GoodsAttr.php deleted file mode 100755 index 9f22e23..0000000 --- a/vendor/antgoods/goods/src/models/ars/GoodsAttr.php +++ /dev/null @@ -1,76 +0,0 @@ - 50], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'goods_id' => '商品id', - 'attr_id' => '属性id', - 'attr_value' => '属性名', - 'is_delete' => '是否删除,1为已删除', - 'created_at' => '创建时间', - 'updated_at' => '更新时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/vendor/antgoods/goods/src/models/ars/GoodsSku.php b/vendor/antgoods/goods/src/models/ars/GoodsSku.php deleted file mode 100755 index ea5b731..0000000 --- a/vendor/antgoods/goods/src/models/ars/GoodsSku.php +++ /dev/null @@ -1,103 +0,0 @@ - 50], - [['goods_sn', 'goods_attr'], 'string', 'max' => 60], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'goods_id' => '商品id', - 'goods_code' => '商品条码', - 'goods_sn' => '商品唯一货号', - 'goods_attr' => '属性匹配', - 'weight' => '重量', - 'length' => '长度', - 'width' => '宽度', - 'height' => '高度', - 'diameter' => '直径', - 'sold_count' => '已售数量', - 'stock' => '库存', - 'market_price' => '市场价', - 'price' => '销售价', - 'model_id' => '模型id', - 'is_sale' => '该商品是否开放销售,1为是,0为否', - 'sort_order' => '排序', - 'is_delete' => '是否删除,1为已删除', - 'created_at' => '创建时间', - 'updated_at' => '更新时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/vendor/antgoods/goods/src/models/ars/ShopCategory.php b/vendor/antgoods/goods/src/models/ars/ShopCategory.php deleted file mode 100755 index aef66d6..0000000 --- a/vendor/antgoods/goods/src/models/ars/ShopCategory.php +++ /dev/null @@ -1,94 +0,0 @@ - 60], - [['keywords'], 'string', 'max' => 100], - [['desc'], 'string', 'max' => 255], - [['icon'], 'string', 'max' => 64], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'name' => '类别名称', - 'pid' => '父级id', - 'goods_count' => '商品数量', - 'keywords' => '关键字', - 'desc' => '描述', - 'sort_order' => '排序', - 'icon_type' => '图标类型', - 'icon' => '图标', - 'filter_attr' => '筛选属性', - 'is_show' => '是否显示,1为不显示', - 'is_delete' => '是否删除,1为已删除', - 'created_at' => '创建时间', - 'updated_at' => '更新时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -} diff --git a/vendor/antgoods/goods/src/models/ars/Supplier.php b/vendor/antgoods/goods/src/models/ars/Supplier.php deleted file mode 100755 index c4ae6a8..0000000 --- a/vendor/antgoods/goods/src/models/ars/Supplier.php +++ /dev/null @@ -1,79 +0,0 @@ - 50], - [['phone'], 'string', 'max' => 20], - ]; - } - - /** - * {@inheritdoc} - */ - public function attributeLabels() - { - return [ - 'id' => 'id', - 'name' => '供应商名称', - 'full_name' => '供应商全称', - 'phone' => '手机号码', - 'address' => '地址', - 'is_delete' => '是否删除,1为已删除', - 'created_at' => '创建时间', - 'updated_at' => '更新时间', - ]; - } - - /** - * @author linyao - * @email 602604991@qq.com - * @created Nov 8, 2019 - * - * 行为存储创建时间和更新时间 - */ - public function behaviors() - { - return [ - [ - 'class' => TimestampBehavior::className(), - 'createdAtAttribute' => 'created_at', - 'updatedAtAttribute' => 'updated_at', - 'value' => function() { - return time(); - }, - ], - ]; - } -}