'15'], // ['main_units','string','max'=>80], // ['longitude_latitude','string','max'=>50], // ['info','string'], // [['open_time','launch_time'],'string', 'max'=>50], // // [['address','sales_address','land_agent'],'string','max'=>100], // ['house_cx','string','max'=>50], ]; } public function Authenticator($input) { $this->load($input,''); if(!$this->validate()) return $this->errors; return $this; } public function FindById($id) { return self::findOne($id); } public function FindByIp() { $query = self::find(); $query->andWhere(['ip'=>$this->ip]); $query->andWhere(['nid'=>$this->nid]); return $query->one(); } }