TimestampBehavior::class, 'attributes' => [ ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'], ] ] ]; } /** * @inheritdoc */ public function rules() { return [ [['store_id', 'start_time', 'end_time', 'created_at'], 'integer'], [['created_at'], 'safe'] ]; } }