code: public function init()
      {
          parent::init();
  
          if (empty($this->attributes)) {
              $this->attributes = [
                  BaseActiveRecord::EVENT_BEFORE_INSERT => [$this->createdByAttribute, $this->updatedByAttribute],
                  BaseActiveRecord::EVENT_BEFORE_UPDATE => $this->updatedByAttribute,
              ];
          }
      }
docs: {@inheritdoc}