Browse Source

feat:创建微信公众号参数设置表

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
35ffe88e71
  1. 32
      backend/modules/wx_public_account/models/ars/WxPublicAccountConfig.php

32
backend/modules/wx_public_account/models/ars/WxPublicAccountConfig.php

@ -3,21 +3,17 @@
namespace backend\modules\wx_public_account\models\ars; namespace backend\modules\wx_public_account\models\ars;
use yii\behaviors\TimestampBehavior;
use yii\redis\ActiveRecord; use yii\redis\ActiveRecord;
/** /**
* Class WxPayConfig
* @package backend\modules\shop\models\ars
* Class WxPublicAccountConfig
* @package backend\modules\wx_public_account\models\ars
* @property int $id * @property int $id
* @property int $user_id 用户id * @property int $user_id 用户id
* @property int $mch_id 商户号
* @property string $key 支付秘钥
* @property string $cert_path cert文件路径
* @property string $key_path key文件路径
* @property int $menu_setting 自定义菜单
*/ */
class WxPayConfig extends ActiveRecord
class WxPublicAccountConfig extends ActiveRecord
{ {
/** /**
* 主键 默认为 id * 主键 默认为 id
@ -36,28 +32,12 @@ class WxPayConfig extends ActiveRecord
*/ */
public function attributes() public function attributes()
{ {
return ['id', 'user_id', 'mch_id', 'key', 'cert_path', 'key_path', 'created_at', 'updated_at'];
return ['id', 'user_id', 'menu_setting'];
} }
/**
* @author linyao
* @email 602604991@qq.com
* @created Nov 8, 2019
*
* 行为存储创建时间和更新时间
*/
public function behaviors() public function behaviors()
{ {
return [
[
'class' => TimestampBehavior::className(),
'createdAtAttribute' => 'created_at',
'updatedAtAttribute' => 'updated_at',
'value' => function () {
return time();
},
],
];
return parent::behaviors(); // TODO: Change the autogenerated stub
} }
} }
Loading…
Cancel
Save