| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use app\jobs\storeSync\DiyCommon;
- use yii\db\ActiveRecord;
- use yii\behaviors\TimestampBehavior;
- use Yii;
- /**
- * This is the model class for table "{{%video_goods}}".
- *
- * @property int $id
- * @property int $store_id
- * @property int $goods_id 商品id
- * @property int $is_delete 是否删除
- * @property int $status 状态
- * @property int created_at 创建时间
- * @property int updated_at 更新时间
- */
- class VideoGoods extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%video_goods}}';
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- 'attributes' => [
- ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
- ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
- ]
- ]
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['store_id', 'goods_id', 'is_delete', 'status', 'created_at', 'updated_at'], 'integer'],
- ];
- }
- public function afterSave($insert, $changedAttributes)
- {
- parent::afterSave($insert, $changedAttributes); // TODO: Change the autogenerated stub
- (new DiyCommon)->JobBehaviors($this->store_id, StoreSyncExtLog::TYPE_VIDEO_GOODS);
- }
- }
|