isNewRecord){ $this->reg_time = time(); $this->reg_ip = ip2long(\Yii::$app->request->getUserIP()); } $this->last_login_time = time(); $this->last_login_ip = ip2long(\Yii::$app->request->getUserIP()); $this->update_time = time(); return true; // TODO: Change the autogenerated stub } public function getStore() { return $this->hasOne(Store::class,['id'=>'store_id']); } }