| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use GuzzleHttp\Client;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- use app\modules\admin\models\wechat_mp\CardForm;
- use app\utils\IotCloudHelper;
- use yii\redis\Cache;
- /**
- * This is the model class for table "{{%promoter_group}}".
- *
- * @property integer $id
- * @property integer $sort
- * @property integer $store_id
- * @property integer $is_show
- * @property integer $is_delete
- * @property string $created_at
- * @property string $updated_at
- * @property string $name
- */
- class PromoterGroup extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%promoter_group}}';
- }
- public function beforeSave($insert)
- {
- if (parent::beforeSave($insert)) {
- if ($this->isNewRecord) {
- $this->created_at = date('Y-m-d H:i:s');
- }else{
- $this->updated_at = date('Y-m-d H:i:s');
- }
- return true;
- }
- return false;
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['id', 'store_id','is_show','is_delete','sort'], 'integer'],
- [['name'], 'string'],
- [['created_at','updated_at'], 'safe'],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- ];
- }
- }
|