| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?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_cat}}".
- *
- * @property integer $id
- * @property integer $cat_id
- * @property integer $f_cat_id
- * @property integer $store_id
- * @property integer $level
- * @property integer $leaf
- * @property integer $is_show
- * @property integer $is_delete
- * @property integer $sort
- * @property string $created_at
- * @property string $updated_at
- */
- class PromoterCat extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%promoter_cat}}';
- }
- 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','f_cat_id', 'cat_id','is_show','is_delete','level','leaf','sort'], 'integer'],
- [['created_at','updated_at'], 'safe'],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- ];
- }
- }
|