Browse Source

更换model模板生成model文件

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
9aca28f7cc
  1. 88
      common/models/ars/Address.php
  2. 80
      common/models/ars/AfterSale.php
  3. 51
      common/models/ars/Area.php
  4. 84
      common/models/ars/Cart.php
  5. 51
      common/models/ars/City.php
  6. 73
      common/models/ars/Collection.php
  7. 80
      common/models/ars/Comment.php
  8. 86
      common/models/ars/Delivery.php
  9. 95
      common/models/ars/ExpressTemplate.php
  10. 86
      common/models/ars/File.php
  11. 121
      common/models/ars/Order.php
  12. 86
      common/models/ars/OrderGoods.php
  13. 85
      common/models/ars/PaymentLog.php
  14. 49
      common/models/ars/Province.php
  15. 71
      common/models/ars/RefundLog.php
  16. 80
      common/models/ars/SearchHistory.php
  17. 84
      common/models/ars/TakingSite.php
  18. 80
      common/models/ars/TemFile.php
  19. 81
      vendor/antgoods/goods/src/models/ars/Attribute.php
  20. 74
      vendor/antgoods/goods/src/models/ars/Brand.php
  21. 87
      vendor/antgoods/goods/src/models/ars/Category.php
  22. 78
      vendor/antgoods/goods/src/models/ars/FilterAttr.php
  23. 135
      vendor/antgoods/goods/src/models/ars/Goods.php
  24. 78
      vendor/antgoods/goods/src/models/ars/GoodsAttr.php
  25. 105
      vendor/antgoods/goods/src/models/ars/GoodsSku.php
  26. 96
      vendor/antgoods/goods/src/models/ars/ShopCategory.php
  27. 81
      vendor/antgoods/goods/src/models/ars/Supplier.php

88
common/models/ars/Address.php

@ -1,88 +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', 'consignee', 'phone', 'address'], 'required'],
[['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();
},
],
];
}
}

80
common/models/ars/AfterSale.php

@ -1,80 +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', 'amount'], 'required'],
[['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' => '完成时间',
];
}
}

51
common/models/ars/Area.php

@ -1,51 +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',
];
}
}

84
common/models/ars/Cart.php

@ -1,84 +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_name', 'sku_id'], 'required'],
[['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();
},
],
];
}
}

51
common/models/ars/City.php

@ -1,51 +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',
];
}
}

73
common/models/ars/Collection.php

@ -1,73 +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'], 'required'],
[['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();
},
],
];
}
}

80
common/models/ars/Comment.php

@ -1,80 +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'], 'required'],
[['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();
},
],
];
}
}

86
common/models/ars/Delivery.php

@ -1,86 +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'],
[['shipping_id'], 'required'],
[['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();
},
],
];
}
}

95
common/models/ars/ExpressTemplate.php

@ -1,95 +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 [
[['name'], 'required'],
[['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();
},
],
];
}
}

86
common/models/ars/File.php

@ -1,86 +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();
},
],
];
}
}

121
common/models/ars/Order.php

@ -1,121 +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'], 'required'],
[['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();
},
],
];
}
}

86
common/models/ars/OrderGoods.php

@ -1,86 +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'], 'required'],
[['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();
},
],
];
}
}

85
common/models/ars/PaymentLog.php

@ -1,85 +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();
},
],
];
}
}

49
common/models/ars/Province.php

@ -1,49 +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',
];
}
}

71
common/models/ars/RefundLog.php

@ -1,71 +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' => '完成时间',
];
}
}

80
common/models/ars/SearchHistory.php

@ -1,80 +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'], 'required'],
[['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();
},
],
];
}
}

84
common/models/ars/TakingSite.php

@ -1,84 +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 [
[['name'], 'required'],
[['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();
},
],
];
}
}

80
common/models/ars/TemFile.php

@ -1,80 +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();
},
],
];
}
}

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

@ -1,81 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "antgoods_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 [
[['name', 'value'], 'required'],
[['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();
},
],
];
}
}

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

@ -1,74 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "antgoods_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 [
[['name'], 'required'],
[['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();
},
],
];
}
}

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

@ -1,87 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "antgoods_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 [
[['name'], 'required'],
[['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();
},
],
];
}
}

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

@ -1,78 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "antgoods_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', 'attr_value'], 'required'],
[['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();
},
],
];
}
}

135
vendor/antgoods/goods/src/models/ars/Goods.php

@ -1,135 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "antgoods_goods".
*
* @property int $id
* @property int $pid 父级id
* @property int $cat_id 后台商品类别id
* @property int $brand_id 品牌id
* @property int $shop_cat_id 前端商品类别id
* @property string $name 商品名称
* @property string $sn 商品唯一货号
* @property string $code 商品货码
* @property int $supplier_id 供应商id
* @property int $weight 重量
* @property int $length 长度
* @property int $width 宽度
* @property int $height 高度
* @property int $diameter 直径
* @property string $unit 单位
* @property int $sold_count 已售数量
* @property int $limit_count 限购数量
* @property int $stock 库存
* @property int $stock_warn 库存警告
* @property int $market_price 市场价
* @property int $price 销售价
* @property string $brief 简介
* @property string $description 详细介绍
* @property int $image 图片id
* @property int $model_id 模型id
* @property int $is_sale 该商品是否开放销售,1为是,0为否
* @property int $sort_order 排序
* @property int $bouns_points 奖励积分
* @property int $experience_points 经验值
* @property int $is_delete 是否删除,1为已删除
* @property int $express_template 配送详情id
* @property int $created_at 创建时间
* @property int $updated_at 更新时间
*/
class Goods extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'antgoods_goods';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['pid', 'cat_id', 'brand_id', 'shop_cat_id', 'supplier_id', 'weight', 'length', 'width', 'height', 'diameter', 'sold_count', 'limit_count', 'stock', 'stock_warn', 'market_price', 'price', 'image', 'model_id', 'is_sale', 'sort_order', 'bouns_points', 'experience_points', 'is_delete', 'express_template'], 'integer'],
[['cat_id', 'brand_id', 'shop_cat_id', 'name', 'sn'], 'required'],
[['description'], 'string'],
[['name'], 'string', 'max' => 120],
[['sn'], 'string', 'max' => 60],
[['code'], 'string', 'max' => 50],
[['unit'], 'string', 'max' => 16],
[['brief'], 'string', 'max' => 255],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'id',
'pid' => '父级id',
'cat_id' => '后台商品类别id',
'brand_id' => '品牌id',
'shop_cat_id' => '前端商品类别id',
'name' => '商品名称',
'sn' => '商品唯一货号',
'code' => '商品货码',
'supplier_id' => '供应商id',
'weight' => '重量',
'length' => '长度',
'width' => '宽度',
'height' => '高度',
'diameter' => '直径',
'unit' => '单位',
'sold_count' => '已售数量',
'limit_count' => '限购数量',
'stock' => '库存',
'stock_warn' => '库存警告',
'market_price' => '市场价',
'price' => '销售价',
'brief' => '简介',
'description' => '详细介绍',
'image' => '图片id',
'model_id' => '模型id',
'is_sale' => '该商品是否开放销售,1为是,0为否',
'sort_order' => '排序',
'bouns_points' => '奖励积分',
'experience_points' => '经验值',
'is_delete' => '是否删除,1为已删除',
'express_template' => '配送详情id',
'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
vendor/antgoods/goods/src/models/ars/GoodsAttr.php

@ -1,78 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "antgoods_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', 'attr_value'], 'required'],
[['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();
},
],
];
}
}

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

@ -1,105 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "antgoods_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', 'goods_sn'], 'required'],
[['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();
},
],
];
}
}

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

@ -1,96 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "antgoods_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 [
[['name'], 'required'],
[['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();
},
],
];
}
}

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

@ -1,81 +0,0 @@
<?php
namespace antgoods\goods\models\ars;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "antgoods_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 [
[['name', 'full_name', 'phone', 'address'], 'required'],
[['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