linyaostalker
5 years ago
64 changed files with 50 additions and 2115 deletions
-
86common/models/ars/Address.php
-
78common/models/ars/AfterSale.php
-
50common/models/ars/Area.php
-
82common/models/ars/Cart.php
-
50common/models/ars/City.php
-
71common/models/ars/Collection.php
-
78common/models/ars/Comment.php
-
84common/models/ars/Delivery.php
-
93common/models/ars/ExpressTemplate.php
-
85common/models/ars/File.php
-
119common/models/ars/Order.php
-
84common/models/ars/OrderGoods.php
-
84common/models/ars/PaymentLog.php
-
48common/models/ars/Province.php
-
70common/models/ars/RefundLog.php
-
78common/models/ars/SearchHistory.php
-
82common/models/ars/TakingSite.php
-
79common/models/ars/TemFile.php
-
0console/migrations/m130524_201442_init.php
-
0console/migrations/m140506_102106_rbac_init.php
-
0console/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php
-
0console/migrations/m180523_151638_rbac_updates_indexes_without_prefix.php
-
0console/migrations/m190124_110200_add_verification_token_column_to_user_table.php
-
0console/migrations/m190802_072830_add_category.php
-
0console/migrations/m191111_101658_create_table_area.php
-
0console/migrations/m191111_102644_create_table_province.php
-
0console/migrations/m191111_102730_create_table_city.php
-
8console/migrations/m191111_102925_create_table_cart.php
-
8console/migrations/m191111_112559_create_table_address.php
-
6console/migrations/m191111_113455_create_table_after_sale.php
-
2console/migrations/m191112_005106_create_table_search_history.php
-
4console/migrations/m191112_005545_create_table_collection.php
-
2console/migrations/m191112_005702_create_table_comment.php
-
2console/migrations/m191112_010421_create_table_order.php
-
4console/migrations/m191112_011517_create_table_order_goods.php
-
2console/migrations/m191112_012449_create_table_taking_site.php
-
2console/migrations/m191112_014508_create_table_express_template.php
-
2console/migrations/m191112_015939_create_table_delivery.php
-
0console/migrations/m191112_020830_create_table_payment_log.php
-
0console/migrations/m191112_021528_create_table_refund_log.php
-
0console/migrations/m191112_022131_create_table_file.php
-
0console/migrations/m191112_022532_create_table_tem_file.php
-
0console/migrations/schema-mysql.sql
-
0console/migrations/sql/add_category.sql
-
0console/migrations/sql/area.sql
-
0console/migrations/sql/city.sql
-
0console/migrations/sql/province.sql
-
6vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php
-
10vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php
-
4vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php
-
6vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php
-
2vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php
-
8vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php
-
6vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php
-
10vendor/antgoods/goods/src/migrations/sql/goods.sql
-
6vendor/antgoods/goods/src/migrations/sql/goods_sku.sql
-
79vendor/antgoods/goods/src/models/ars/Attribute.php
-
72vendor/antgoods/goods/src/models/ars/Brand.php
-
85vendor/antgoods/goods/src/models/ars/Category.php
-
76vendor/antgoods/goods/src/models/ars/FilterAttr.php
-
76vendor/antgoods/goods/src/models/ars/GoodsAttr.php
-
103vendor/antgoods/goods/src/models/ars/GoodsSku.php
-
94vendor/antgoods/goods/src/models/ars/ShopCategory.php
-
79vendor/antgoods/goods/src/models/ars/Supplier.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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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' => '完成时间', |
|||
]; |
|||
} |
|||
|
|||
} |
@ -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', |
|||
]; |
|||
} |
|||
|
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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', |
|||
]; |
|||
} |
|||
|
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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', |
|||
]; |
|||
} |
|||
|
|||
} |
@ -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' => '完成时间', |
|||
]; |
|||
} |
|||
|
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
@ -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(); |
|||
}, |
|||
], |
|||
]; |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue