TimestampBehavior::class, 'attributes' => [ ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'], ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at' ] ] ]; } /** * {@inheritdoc} */ public function rules() { return [ [['sort', 'is_delete', 'store_id', 'created_at', 'updated_at', 'type'], 'integer'], [['name'], 'string', 'max' => 255], [['desc'], 'string'] ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'name' => 'Name', 'desc' => '文章详情', 'sort' => 'Sort', 'is_delete' => 'Is Delete', 'store_id' => 'Store ID', 'created_at' => 'created_at', 'updated_at' => 'updated_at', 'type' => '文章类型' ]; } public function afterSave($insert, $changedAttributes) { parent::afterSave($insert, $changedAttributes); // TODO: Change the autogenerated stub (new DiyCommon)->JobBehaviors($this->store_id, StoreSyncExtLog::TYPE_ARTICLE); } }