| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use app\jobs\storeSync\DiyCommon;
- use Yii;
- /**
- * This is the model class for table "{{%new_diy_template}}".
- *
- * @property integer $id
- * @property integer $store_id
- * @property string $name
- * @property string $template
- * @property integer $is_delete
- * @property integer $addtime
- * @property integer $index
- * @property string $type
- */
- class NewDiyTemplate extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%new_diy_template}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['store_id', 'template', 'addtime'], 'required'],
- [['store_id', 'is_delete', 'addtime', 'is_index', 'type'], 'integer'],
- [['template'], 'string'],
- [['name'], 'string', 'max' => 45],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => 'Store ID',
- 'name' => 'Name',
- 'template' => 'Template',
- 'is_delete' => 'Is Delete',
- 'addtime' => 'Addtime',
- 'type' => '类型 index 首页,user 用户中心,goods 商品详情',
- 'is_index' => '是否设为首页'
- ];
- }
- public function afterSave($insert, $changedAttributes)
- {
- parent::afterSave($insert, $changedAttributes); // TODO: Change the autogenerated stub
- (new DiyCommon)->JobBehaviors($this->store_id, StoreSyncExtLog::TYPE_DIY, [$this->id]);
- }
- }
|