X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/1b020b02e1d1fa56e737c8c5dbf5d7e5f48d587e..c6f4483147eb5c725af37296a02c9fc5006d1b3f:/Entity/User.php

diff --git a/Entity/User.php b/Entity/User.php
index 1fb9f1a..fe838c3 100644
--- a/Entity/User.php
+++ b/Entity/User.php
@@ -13,27 +13,33 @@ namespace Rapsys\AirBundle\Entity;
 
 use Doctrine\Common\Collections\ArrayCollection;
 
-use Rapsys\AirBundle\Entity\Application;
-use Rapsys\AirBundle\Entity\Group;
-use Rapsys\AirBundle\Entity\Link;
-use Rapsys\AirBundle\Entity\Snippet;
 use Rapsys\UserBundle\Entity\User as BaseUser;
 
 class User extends BaseUser {
 	/**
 	 * @var string
 	 */
-	protected $pseudonym;
+	protected $city;
 
 	/**
 	 * @var string
 	 */
 	protected $phone;
 
+	/**
+	 * @var Country
+	 */
+	protected $country;
+
+	/**
+	 * @var string
+	 */
+	protected $pseudonym;
+
 	/**
 	 * @var string
 	 */
-	protected $slug;
+	protected $zipcode;
 
 	/**
 	 * @var ArrayCollection
@@ -75,9 +81,11 @@ class User extends BaseUser {
 		parent::__construct($mail);
 
 		//Set defaults
-		$this->pseudonym = null;
+		$this->city = null;
+		$this->country = null;
 		$this->phone = null;
-		$this->slug = null;
+		$this->pseudonym = null;
+		$this->zipcode = null;
 
 		//Set collections
 		$this->applications = new ArrayCollection();
@@ -89,25 +97,47 @@ class User extends BaseUser {
 	}
 
 	/**
-	 * Set pseudonym
+	 * Set country
 	 *
-	 * @param string $pseudonym
+	 * @param Country $country
+	 *
+	 * @return Snippet
+	 */
+	public function setCountry(Country $country) {
+		$this->country = $country;
+
+		return $this;
+	}
+
+	/**
+	 * Get country
+	 *
+	 * @return Country
+	 */
+	public function getCountry() {
+		return $this->country;
+	}
+
+	/**
+	 * Set city
+	 *
+	 * @param string $city
 	 *
 	 * @return User
 	 */
-	public function setPseudonym(?string $pseudonym): User {
-		$this->pseudonym = $pseudonym;
+	public function setCity(?string $city): User {
+		$this->city = $city;
 
 		return $this;
 	}
 
 	/**
-	 * Get pseudonym
+	 * Get city
 	 *
 	 * @return string
 	 */
-	public function getPseudonym(): ?string {
-		return $this->pseudonym;
+	public function getCity(): ?string {
+		return $this->city;
 	}
 
 	/**
@@ -133,87 +163,78 @@ class User extends BaseUser {
 	}
 
 	/**
-	 * Set slug
+	 * Set pseudonym
 	 *
-	 * @param string $slug
+	 * @param string $pseudonym
 	 *
 	 * @return User
 	 */
-	public function setSlug(?string $slug): User {
-		$this->slug = $slug;
+	public function setPseudonym(?string $pseudonym): User {
+		$this->pseudonym = $pseudonym;
 
 		return $this;
 	}
 
 	/**
-	 * Get slug
+	 * Get pseudonym
 	 *
 	 * @return string
 	 */
-	public function getSlug(): ?string {
-		return $this->slug;
+	public function getPseudonym(): ?string {
+		return $this->pseudonym;
 	}
 
 	/**
-	 * Add application
+	 * Set zipcode
 	 *
-	 * @param Application $application
+	 * @param string $zipcode
 	 *
 	 * @return User
 	 */
-	public function addApplication(Application $application): User {
-		$this->applications[] = $application;
+	public function setZipcode(?string $zipcode): User {
+		$this->zipcode = $zipcode;
 
 		return $this;
 	}
 
 	/**
-	 * Remove application
+	 * Get zipcode
 	 *
-	 * @param Application $application
+	 * @return string
 	 */
-	public function removeApplication(Application $application): bool {
-		return $this->applications->removeElement($application);
+	public function getZipcode(): ?string {
+		return $this->zipcode;
 	}
 
 	/**
-	 * Get applications
-	 *
-	 * @return ArrayCollection
-	 */
-	public function getApplications(): ArrayCollection {
-		return $this->applications;
-	}
-
-	/**
-	 * Add snippet
+	 * Add application
 	 *
-	 * @param Snippet $snippet
+	 * @param Application $application
 	 *
 	 * @return User
 	 */
-	public function addSnippet(Snippet $snippet): User {
-		$this->snippets[] = $snippet;
+	public function addApplication(Application $application): User {
+		$this->applications[] = $application;
 
 		return $this;
 	}
 
 	/**
-	 * Remove snippet
+	 * Remove application
 	 *
-	 * @param Snippet $snippet
+	 * @param Application $application
 	 */
-	public function removeSnippet(Snippet $snippet): bool {
-		return $this->snippets->removeElement($snippet);
+	public function removeApplication(Application $application): bool {
+		return $this->applications->removeElement($application);
 	}
 
 	/**
-	 * Get snippets
+	 * Get applications
 	 *
 	 * @return ArrayCollection
 	 */
-	public function getSnippets(): ArrayCollection {
-		return $this->snippets;
+	public function getApplications(): ArrayCollection {
+		return $this->applications;
 	}
 
 	/**
@@ -280,6 +301,37 @@ class User extends BaseUser {
 		return $this->locations;
 	}
 
+	/**
+	 * Add snippet
+	 *
+	 * @param Snippet $snippet
+	 *
+	 * @return User
+	 */
+	public function addSnippet(Snippet $snippet): User {
+		$this->snippets[] = $snippet;
+
+		return $this;
+	}
+
+	/**
+	 * Remove snippet
+	 *
+	 * @param Snippet $snippet
+	 */
+	public function removeSnippet(Snippet $snippet): bool {
+		return $this->snippets->removeElement($snippet);
+	}
+
+	/**
+	 * Get snippets
+	 *
+	 * @return ArrayCollection
+	 */
+	public function getSnippets(): ArrayCollection {
+		return $this->snippets;
+	}
+
 	/**
 	 * Add subscriber
 	 *