Browse Source

修改数据库字段

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
8ba1b9474e
  1. 86
      common/models/ars/Address.php
  2. 78
      common/models/ars/AfterSale.php
  3. 50
      common/models/ars/Area.php
  4. 82
      common/models/ars/Cart.php
  5. 50
      common/models/ars/City.php
  6. 71
      common/models/ars/Collection.php
  7. 78
      common/models/ars/Comment.php
  8. 84
      common/models/ars/Delivery.php
  9. 93
      common/models/ars/ExpressTemplate.php
  10. 85
      common/models/ars/File.php
  11. 119
      common/models/ars/Order.php
  12. 84
      common/models/ars/OrderGoods.php
  13. 84
      common/models/ars/PaymentLog.php
  14. 48
      common/models/ars/Province.php
  15. 70
      common/models/ars/RefundLog.php
  16. 78
      common/models/ars/SearchHistory.php
  17. 82
      common/models/ars/TakingSite.php
  18. 79
      common/models/ars/TemFile.php
  19. 0
      console/migrations/m130524_201442_init.php
  20. 0
      console/migrations/m140506_102106_rbac_init.php
  21. 0
      console/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php
  22. 0
      console/migrations/m180523_151638_rbac_updates_indexes_without_prefix.php
  23. 0
      console/migrations/m190124_110200_add_verification_token_column_to_user_table.php
  24. 0
      console/migrations/m190802_072830_add_category.php
  25. 0
      console/migrations/m191111_101658_create_table_area.php
  26. 0
      console/migrations/m191111_102644_create_table_province.php
  27. 0
      console/migrations/m191111_102730_create_table_city.php
  28. 8
      console/migrations/m191111_102925_create_table_cart.php
  29. 8
      console/migrations/m191111_112559_create_table_address.php
  30. 6
      console/migrations/m191111_113455_create_table_after_sale.php
  31. 2
      console/migrations/m191112_005106_create_table_search_history.php
  32. 4
      console/migrations/m191112_005545_create_table_collection.php
  33. 2
      console/migrations/m191112_005702_create_table_comment.php
  34. 2
      console/migrations/m191112_010421_create_table_order.php
  35. 4
      console/migrations/m191112_011517_create_table_order_goods.php
  36. 2
      console/migrations/m191112_012449_create_table_taking_site.php
  37. 2
      console/migrations/m191112_014508_create_table_express_template.php
  38. 2
      console/migrations/m191112_015939_create_table_delivery.php
  39. 0
      console/migrations/m191112_020830_create_table_payment_log.php
  40. 0
      console/migrations/m191112_021528_create_table_refund_log.php
  41. 0
      console/migrations/m191112_022131_create_table_file.php
  42. 0
      console/migrations/m191112_022532_create_table_tem_file.php
  43. 0
      console/migrations/schema-mysql.sql
  44. 0
      console/migrations/sql/add_category.sql
  45. 0
      console/migrations/sql/area.sql
  46. 0
      console/migrations/sql/city.sql
  47. 0
      console/migrations/sql/province.sql
  48. 6
      vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php
  49. 10
      vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php
  50. 4
      vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php
  51. 6
      vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php
  52. 2
      vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php
  53. 8
      vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php
  54. 6
      vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php
  55. 10
      vendor/antgoods/goods/src/migrations/sql/goods.sql
  56. 6
      vendor/antgoods/goods/src/migrations/sql/goods_sku.sql
  57. 79
      vendor/antgoods/goods/src/models/ars/Attribute.php
  58. 72
      vendor/antgoods/goods/src/models/ars/Brand.php
  59. 85
      vendor/antgoods/goods/src/models/ars/Category.php
  60. 76
      vendor/antgoods/goods/src/models/ars/FilterAttr.php
  61. 76
      vendor/antgoods/goods/src/models/ars/GoodsAttr.php
  62. 103
      vendor/antgoods/goods/src/models/ars/GoodsSku.php
  63. 94
      vendor/antgoods/goods/src/models/ars/ShopCategory.php
  64. 79
      vendor/antgoods/goods/src/models/ars/Supplier.php

86
common/models/ars/Address.php

@ -1,86 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_address".
*
* @property int $id
* @property int $user_id 用户id
* @property string $consignee 收件人
* @property string $phone 电话
* @property string $province 省份
* @property string $city 城市
* @property string $area 区域
* @property string $address 详细地址
* @property int $status 状态,0-默认值 1-默认地址
* @property int $created_at 创建时间
* @property int $updated_at 更新时间
*/
class Address extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_address';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['user_id', 'status'], 'integer'],
[['address'], 'string'],
[['consignee', 'phone'], 'string', 'max' => 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();
},
],
];
}
}

78
common/models/ars/AfterSale.php

@ -1,78 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_after_sale".
*
* @property int $id
* @property int $operator_id 操作者
* @property int $user_id 用户id
* @property string $wx_refund_id 微信退款单号
* @property string $after_sale_sn 售后单号
* @property int $order_goods_id 订单商品id
* @property int $count 退换货的商品数量
* @property int $amount 退货时实际退的金额
* @property int $type 类型
* @property int $reason 退换货理由
* @property string $description 描述
* @property string $take_shipping_sn 用户发货物流单号
* @property string $send_shipping_sn 换货商家发货的物流单号
* @property string $remarks 店家备注
* @property int $applyed_at 申请时间
* @property int $dealed_at 处理时间
* @property int $finished_at 完成时间
*/
class AfterSale extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_after_sale';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['operator_id', 'user_id', 'order_goods_id', 'count', 'amount', 'type', 'reason', 'applyed_at', 'dealed_at', 'finished_at'], 'integer'],
[['description', 'remarks'], 'string'],
[['wx_refund_id', 'after_sale_sn'], 'string', 'max' => 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' => '完成时间',
];
}
}

50
common/models/ars/Area.php

@ -1,50 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "area".
*
* @property int $id
* @property string $name
* @property int $area_id
* @property int $city_id
*/
class Area extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'area';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['area_id', 'city_id'], 'integer'],
[['name'], 'string', 'max' => 32],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'id',
'name' => 'name',
'area_id' => 'area_id',
'city_id' => 'city_id',
];
}
}

82
common/models/ars/Cart.php

@ -1,82 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_cart".
*
* @property int $id
* @property int $user_id 用户id
* @property int $goods_id 商品id
* @property string $goods_name 商品名称
* @property int $goods_img 商品图片
* @property int $goods_price 商品售价
* @property int $sku_id 商品sku的id
* @property int $goods_count 商品数量
* @property int $created_at 创建时间
* @property int $updated_at 更新时间
*/
class Cart extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_cart';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['user_id', 'goods_id', 'goods_img', 'goods_price', 'sku_id', 'goods_count'], 'integer'],
[['goods_name'], 'string', 'max' => 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();
},
],
];
}
}

50
common/models/ars/City.php

@ -1,50 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "city".
*
* @property int $id
* @property int $city_id
* @property string $name
* @property int $province_id
*/
class City extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'city';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['city_id', 'province_id'], 'integer'],
[['name'], 'string', 'max' => 32],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'id',
'city_id' => 'city_id',
'name' => 'name',
'province_id' => 'province_id',
];
}
}

71
common/models/ars/Collection.php

@ -1,71 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_collection".
*
* @property int $id
* @property int $user_id 用户id
* @property int $goods_id 商品id
* @property int $updated_at 更新时间
* @property int $created_at 创建时间
*/
class Collection extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_collection';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['user_id', 'goods_id'], 'integer'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => '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();
},
],
];
}
}

78
common/models/ars/Comment.php

@ -1,78 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_comment".
*
* @property int $id
* @property int $user_id 用户id
* @property int $order_goods_id 订单详情商品id
* @property int $star 星级
* @property string $content 评论内容
* @property int $status 状态:1为显示,0为不显示
* @property int $updated_at 更新时间
* @property int $created_at 创建时间
*/
class Comment extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_comment';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['user_id', 'order_goods_id', 'star', 'status'], 'integer'],
[['content'], 'string'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => '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();
},
],
];
}
}

84
common/models/ars/Delivery.php

@ -1,84 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_delivery".
*
* @property int $id
* @property int $order_id 订单id
* @property string $shipping_name 货流名称
* @property string $shipping_id 运货单位
* @property int $type 类型
* @property string $goods 商品
* @property int $status 状态
* @property string $decription 描述
* @property int $updated_at 更新时间
* @property int $created_at 创建时间
*/
class Delivery extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_delivery';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['order_id', 'type', 'status'], 'integer'],
[['goods', 'decription'], 'string'],
[['shipping_name'], 'string', 'max' => 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();
},
],
];
}
}

93
common/models/ars/ExpressTemplate.php

@ -1,93 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_express_template".
*
* @property int $id
* @property string $name 名称
* @property string $province 省份
* @property string $city 城市
* @property string $area 区域
* @property int $billing_type 账单类型
* @property int $extra_weight_type 续重重量类型
* @property int $exemption_type 包邮类型
* @property int $basic_price 基本运费
* @property int $extra_price 续重运费
* @property int $exemption_amount 包邮金额
* @property int $support_taking 是否支持自提,1为不支持
* @property string $taking_site 自提地点
* @property int $updated_at 更新时间
* @property int $created_at 创建时间
*/
class ExpressTemplate extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_express_template';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['province', 'city', 'area', 'taking_site'], 'string'],
[['billing_type', 'extra_weight_type', 'exemption_type', 'basic_price', 'extra_price', 'exemption_amount', 'support_taking'], 'integer'],
[['name'], 'string', 'max' => 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();
},
],
];
}
}

85
common/models/ars/File.php

@ -1,85 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_file".
*
* @property int $id
* @property int $pid 父级id
* @property string $name 名称
* @property int $type 类型
* @property int $own_type 拥有者类型
* @property int $own_id 拥有者id
* @property string $alias 别名
* @property string $path 地址
* @property int $is_delete 是否删除,1为已删除
* @property int $updated_at 更新时间
* @property int $created_at 创建时间
*/
class File extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_file';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['pid', 'type', 'own_type', 'own_id', 'is_delete'], 'integer'],
[['name', 'path'], 'string', 'max' => 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();
},
],
];
}
}

119
common/models/ars/Order.php

@ -1,119 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_order".
*
* @property int $id
* @property int $user_id 用户id
* @property string $order_sn 订单号
* @property string $invoice_id 发票单号
* @property int $status 状态
* @property int $type 类型
* @property int $goods_count 商品数量
* @property int $goods_amount 商品金额
* @property int $shipping_amount 物流金额
* @property int $shipping_type 物流类型
* @property string $consignee 收件人
* @property string $phone 手机号码
* @property string $province 省份
* @property string $city 城市
* @property string $area 区域
* @property int $taking_site 自提点
* @property int $pay_type 支付方式
* @property int $pay_at 支付时间
* @property string $payment_sn 付款单号
* @property int $payment_amount 支付金额
* @property int $receivables 应收款
* @property string $remarks 备注
* @property int $discount_amount 折扣金额
* @property string $discount_decription 折扣说明
* @property int $updated_at 更新时间
* @property int $created_at 创建时间
*/
class Order extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_order';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['user_id', 'status', 'type', 'goods_count', 'goods_amount', 'shipping_amount', 'shipping_type', 'taking_site', 'pay_type', 'pay_at', 'payment_amount', 'receivables', 'discount_amount'], 'integer'],
[['discount_decription'], 'string'],
[['order_sn', 'invoice_id'], 'string', 'max' => 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();
},
],
];
}
}

84
common/models/ars/OrderGoods.php

@ -1,84 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_order_goods".
*
* @property int $id
* @property int $order_id 订单id
* @property int $goods_id 商品id
* @property int $goods_img 商品图片
* @property string $goods_name 商品名称
* @property int $goods_count 商品数量
* @property string $sku_value 商品sku
* @property int $price 销售价
* @property int $market_price 市场价
* @property int $updated_at 更新时间
* @property int $created_at 创建时间
*/
class OrderGoods extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_order_goods';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['order_id', 'goods_id', 'goods_img', 'goods_count', 'price', 'market_price'], 'integer'],
[['goods_name', 'sku_value'], 'string', 'max' => 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();
},
],
];
}
}

84
common/models/ars/PaymentLog.php

@ -1,84 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_payment_log".
*
* @property int $id
* @property int $order_id 订单id
* @property string $wx_refund_id 微信退款单号
* @property string $mch_id 商户号
* @property int $order_amount 订单金额
* @property int $payment_amount 支付金额
* @property int $type 类型
* @property int $status 状态
* @property string $refund_account 退款账户
* @property int $updated_at 更新时间
* @property int $created_at 创建时间
*/
class PaymentLog extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_payment_log';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['order_id', 'order_amount', 'payment_amount', 'type', 'status'], 'integer'],
[['wx_refund_id', 'mch_id', 'refund_account'], 'string', 'max' => 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();
},
],
];
}
}

48
common/models/ars/Province.php

@ -1,48 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "province".
*
* @property int $id
* @property string $name
* @property int $province_id
*/
class Province extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'province';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['province_id'], 'integer'],
[['name'], 'string', 'max' => 16],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'id',
'name' => 'name',
'province_id' => 'province_id',
];
}
}

70
common/models/ars/RefundLog.php

@ -1,70 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_refund_log".
*
* @property int $id
* @property int $order_id 订单id
* @property string $wx_refund_id 微信退款单号
* @property int $reason 理由
* @property int $order_amount 订单金额
* @property int $refund_amount 退款金额
* @property int $refunded_amount 已退款金额
* @property int $type 类型
* @property int $status 状态
* @property string $refund_account 退款账户
* @property int $operator_id 操作者
* @property int $applyed_at 申请时间
* @property int $confirmed_at 确认时间
* @property int $finished_at 完成时间
*/
class RefundLog extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_refund_log';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['order_id', 'reason', 'order_amount', 'refund_amount', 'refunded_amount', 'type', 'status', 'operator_id', 'applyed_at', 'confirmed_at', 'finished_at'], 'integer'],
[['wx_refund_id', 'refund_account'], 'string', 'max' => 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' => '完成时间',
];
}
}

78
common/models/ars/SearchHistory.php

@ -1,78 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_search_history".
*
* @property int $id
* @property int $user_id 用户id
* @property string $keyword 关键字
* @property int $count 次数
* @property int $status 状态
* @property int $type 类型
* @property int $updated_at 更新时间
* @property int $created_at 创建时间
*/
class SearchHistory extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_search_history';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['user_id', 'count', 'status', 'type'], 'integer'],
[['keyword'], 'string', 'max' => 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();
},
],
];
}
}

82
common/models/ars/TakingSite.php

@ -1,82 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_taking_site".
*
* @property int $id
* @property string $name 名称
* @property string $province 省份
* @property string $city 城市
* @property string $area 区域
* @property string $address 地址
* @property int $is_default 是否为默认,1为默认
* @property int $updated_at 更新时间
* @property int $created_at 创建时间
*/
class TakingSite extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_taking_site';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['address'], 'string'],
[['is_default'], 'integer'],
[['name'], 'string', 'max' => 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();
},
],
];
}
}

79
common/models/ars/TemFile.php

@ -1,79 +0,0 @@
<?php
namespace common\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_tem_file".
*
* @property int $id
* @property int $user_id 父级id
* @property string $name 名称
* @property int $type 类型
* @property string $alias 别名
* @property string $path 地址
* @property int $updated_at 更新时间
* @property int $created_at 创建时间
*/
class TemFile extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'ats_tem_file';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['user_id', 'type'], 'integer'],
[['name', 'path'], 'string', 'max' => 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();
},
],
];
}
}

0
console/migrations/m130524_201442_init.php

0
console/migrations/m140506_102106_rbac_init.php

0
console/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php

0
console/migrations/m180523_151638_rbac_updates_indexes_without_prefix.php

0
console/migrations/m190124_110200_add_verification_token_column_to_user_table.php

0
console/migrations/m190802_072830_add_category.php

0
console/migrations/m191111_101658_create_table_area.php

0
console/migrations/m191111_102644_create_table_province.php

0
console/migrations/m191111_102730_create_table_city.php

8
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('更新时间'),

8
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('更新时间'),

6
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('描述'),

2
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('状态'),

4
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);

2
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('评论内容'),

2
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('状态'),

4
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('商品数量'),

2
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('区域'),

2
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('区域'),

2
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('状态'),

0
console/migrations/m191112_020830_create_table_payment_log.php

0
console/migrations/m191112_021528_create_table_refund_log.php

0
console/migrations/m191112_022131_create_table_file.php

0
console/migrations/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

6
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('筛选属性'),

10
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);

4
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为已删除'),

6
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('更新时间'),

2
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('更新时间'),

8
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('更新时间'),

6
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('更新时间'),

10
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 '重量',

6
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 '更新时间',

79
vendor/antgoods/goods/src/models/ars/Attribute.php

@ -1,79 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_attribute".
*
* @property int $id
* @property string $name 属性名
* @property string $value 属性值
* @property int $type 类型
* @property int $sort_order 排序
* @property int $is_delete 是否删除,1为已删除
* @property int $created_at 创建时间
* @property int $updated_at 更新时间
*/
class Attribute extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'antgoods_attribute';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['value'], 'string'],
[['type', 'sort_order', 'is_delete'], 'integer'],
[['name'], 'string', 'max' => 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();
},
],
];
}
}

72
vendor/antgoods/goods/src/models/ars/Brand.php

@ -1,72 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_brand".
*
* @property int $id
* @property string $name 品牌名
* @property int $is_delete 是否删除,1为已删除
* @property int $created_at 创建时间
* @property int $updated_at 更新时间
*/
class Brand extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'antgoods_brand';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['is_delete'], 'integer'],
[['name'], 'string', 'max' => 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();
},
],
];
}
}

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

@ -1,85 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_category".
*
* @property int $id
* @property string $name 类别名称
* @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为已删除
* @property int $created_at 创建时间
* @property int $updated_at 更新时间
*/
class Category extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'antgoods_category';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['pid', 'goods_count', 'sort_order', 'icon_type', 'is_show', 'is_delete'], 'integer'],
[['name'], 'string', 'max' => 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();
},
],
];
}
}

76
vendor/antgoods/goods/src/models/ars/FilterAttr.php

@ -1,76 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_filter_attr".
*
* @property int $id
* @property int $goods_id 商品id
* @property int $attr_id 属性id
* @property string $attr_value 属性值
* @property int $is_delete 是否删除,1为已删除
* @property int $created_at 创建时间
* @property int $updated_at 更新时间
*/
class FilterAttr extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'antgoods_filter_attr';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['goods_id', 'attr_id', 'is_delete'], 'integer'],
[['attr_value'], 'string', 'max' => 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();
},
],
];
}
}

76
vendor/antgoods/goods/src/models/ars/GoodsAttr.php

@ -1,76 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_goods_attr".
*
* @property int $id
* @property int $goods_id 商品id
* @property int $attr_id 属性id
* @property string $attr_value 属性名
* @property int $is_delete 是否删除,1为已删除
* @property int $created_at 创建时间
* @property int $updated_at 更新时间
*/
class GoodsAttr extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'antgoods_goods_attr';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['goods_id', 'attr_id', 'is_delete'], 'integer'],
[['attr_value'], 'string', 'max' => 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();
},
],
];
}
}

103
vendor/antgoods/goods/src/models/ars/GoodsSku.php

@ -1,103 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_goods_sku".
*
* @property int $id
* @property int $goods_id 商品id
* @property string $goods_code 商品条码
* @property string $goods_sn 商品唯一货号
* @property string $goods_attr 属性匹配
* @property int $weight 重量
* @property int $length 长度
* @property int $width 宽度
* @property int $height 高度
* @property int $diameter 直径
* @property int $sold_count 已售数量
* @property int $stock 库存
* @property int $market_price 市场价
* @property int $price 销售价
* @property int $model_id 模型id
* @property int $is_sale 该商品是否开放销售,1为是,0为否
* @property int $sort_order 排序
* @property int $is_delete 是否删除,1为已删除
* @property int $created_at 创建时间
* @property int $updated_at 更新时间
*/
class GoodsSku extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'antgoods_goods_sku';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['goods_id', 'weight', 'length', 'width', 'height', 'diameter', 'sold_count', 'stock', 'market_price', 'price', 'model_id', 'is_sale', 'sort_order', 'is_delete'], 'integer'],
[['goods_code'], 'string', 'max' => 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();
},
],
];
}
}

94
vendor/antgoods/goods/src/models/ars/ShopCategory.php

@ -1,94 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_shop_category".
*
* @property int $id
* @property string $name 类别名称
* @property int $pid 父级id
* @property int $goods_count 商品数量
* @property string $keywords 关键字
* @property string $desc 描述
* @property int $sort_order 排序
* @property int $icon_type 图标类型
* @property string $icon 图标
* @property string $filter_attr 筛选属性
* @property int $is_show 是否显示,1为不显示
* @property int $is_delete 是否删除,1为已删除
* @property int $created_at 创建时间
* @property int $updated_at 更新时间
*/
class ShopCategory extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'antgoods_shop_category';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['pid', 'goods_count', 'sort_order', 'icon_type', 'is_show', 'is_delete'], 'integer'],
[['filter_attr'], 'string'],
[['name'], 'string', 'max' => 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();
},
],
];
}
}

79
vendor/antgoods/goods/src/models/ars/Supplier.php

@ -1,79 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "ats_supplier".
*
* @property int $id
* @property string $name 供应商名称
* @property string $full_name 供应商全称
* @property string $phone 手机号码
* @property string $address 地址
* @property int $is_delete 是否删除,1为已删除
* @property int $created_at 创建时间
* @property int $updated_at 更新时间
*/
class Supplier extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'antgoods_supplier';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['is_delete'], 'integer'],
[['name', 'full_name', 'address'], 'string', 'max' => 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();
},
],
];
}
}
Loading…
Cancel
Save