| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?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_qua}}".
- *
- * @property integer $id
- * @property integer $qua_id
- * @property integer $cat_id
- * @property integer $brand_qua_id
- * @property integer $need_to_apply
- * @property integer $mandatory
- * @property string $created_at
- * @property string $updated_at
- * @property string $tips
- */
- class PromoterBrandQua extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%promoter_qua}}';
- }
- 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', 'qua_id','cat_id','brand_qua_id','mandatory'], 'integer'],
- [['tips'], 'string'],
- [['created_at','updated_at'], 'safe'],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- ];
- }
- }
|