diff --git a/app/entity/user_entity.php b/app/entity/user_entity.php new file mode 100644 index 0000000..5e19525 --- /dev/null +++ b/app/entity/user_entity.php @@ -0,0 +1,124 @@ +_prefix = 'user_'; + } + + public function getId():int{ + return $this->_id; + } + public function setId(int $id){ + $this->_id = $id; + } + + public function getName():string{ + return $this->_name; + } + public function setName(string $name){ + $this->_name = $name; + } + + public function getFirstname():string{ + return $this->_firstname; + } + public function setFirstname(string $firstname){ + $this->_firstname = $firstname; + } + + public function getPseudo():string{ + return $this->_pseudo; + } + public function setPseudo(string $pseudo){ + $this->_pseudo = $pseudo; + } + + public function getImage():string{ + return $this->_image; + } + public function setImage(string $image){ + $this->_image = $image; + } + + public function getMail():string{ + return $this->_mail; + } + public function setMail(string $mail){ + $this->_mail = strtolower($mail); + } + + public function getPwd():string{ + return $this->_pwd; + } + public function getPwdHash():string{ + return password_hash($this->_pwd, PASSWORD_DEFAULT); + } + public function setPwd(string $pwd){ + $this->_pwd = $pwd; + } + + public function getPhone():string{ + return $this->_phone; + } + public function setPhone(string $phone){ + $this->_phone = $phone; + } + + public function getWork():string{ + return $this->_work; + } + public function setWork(string $work){ + $this->_work = $work; + } + + public function getBirth():string{ + return $this->_birth; + } + public function setBirth(string $birth){ + $this->_birth = $birth; + } + + public function getLocation():string{ + return $this->_location; + } + public function setLocation(string $location){ + $this->_location = $location; + } + + public function getDescription():string{ + return $this->_description; + } + public function setDescription(string $description){ + $this->_description = $description; + } + + public function getAccountCreation():string{ + return $this->_account_creation; + } + public function setAccountCreation(string $account_creation){ + $this->_account_creation = $account_creation; + } + + public function getStatus():int{ + return $this->_status; + } + public function setStatus(int $status){ + $this->_status = $status; + } + }