|
|
@ -3,21 +3,17 @@ |
|
|
|
|
|
|
|
namespace backend\modules\wx_public_account\models\ars; |
|
|
|
|
|
|
|
use yii\behaviors\TimestampBehavior; |
|
|
|
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 $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 |
|
|
@ -36,28 +32,12 @@ class WxPayConfig extends ActiveRecord |
|
|
|
*/ |
|
|
|
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() |
|
|
|
{ |
|
|
|
return [ |
|
|
|
[ |
|
|
|
'class' => TimestampBehavior::className(), |
|
|
|
'createdAtAttribute' => 'created_at', |
|
|
|
'updatedAtAttribute' => 'updated_at', |
|
|
|
'value' => function () { |
|
|
|
return time(); |
|
|
|
}, |
|
|
|
], |
|
|
|
]; |
|
|
|
return parent::behaviors(); // TODO: Change the autogenerated stub
|
|
|
|
} |
|
|
|
|
|
|
|
} |