src/Entity/Address.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity()
  7.  * @ORM\Table(name="address")
  8.  */
  9. class Address
  10. {
  11.     /**
  12.      * @ORM\Column(type="integer")
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue(strategy="AUTO")
  15.      */ 
  16.     private $addressId=0;              
  17.     
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     protected $street;    
  22.     
  23.     /**
  24.      * @ORM\Column(type="text", nullable=true)
  25.      */
  26.     protected $streetNumber;    
  27.     
  28.     /**
  29.      * @ORM\Column(type="string", length=255, nullable=true)
  30.      */
  31.     protected $city;    
  32.     /**
  33.      * @ORM\Column(type="string", length=255, nullable=true)
  34.      */
  35.     protected $zipCode;    
  36.     
  37.     /**
  38.      * @ORM\Column(type="string", length=255, nullable=true)
  39.      */
  40.     protected $country;
  41.     /*
  42.      * @ORM\OneToOne(targetEntity="Contact", inversedBy="address", cascade={"persist", "remove"})
  43.      * @ORM\JoinColumn(name="contact_id", referencedColumnName="contact_id")
  44.      */
  45.     //protected $contact;
  46.     /*
  47.      * @ORM\OneToOne(targetEntity="Contact", inversedBy="deliveryAddress")
  48.      * @ORM\JoinColumn(name="contact_id", referencedColumnName="contact_id")
  49.      */
  50.     //protected $deliveryContact;
  51.     /**
  52.      * Get addressId
  53.      *
  54.      * @return integer
  55.      */
  56.     public function getAddressId()
  57.     {
  58.         return $this->addressId;
  59.     }
  60.     /**
  61.      * Set street
  62.      *
  63.      * @param string $street
  64.      *
  65.      * @return Address
  66.      */
  67.     public function setStreet($street)
  68.     {
  69.         $this->street $street;
  70.         return $this;
  71.     }
  72.     /**
  73.      * Get street
  74.      *
  75.      * @return string
  76.      */
  77.     public function getStreet()
  78.     {
  79.         return $this->street;
  80.     }
  81.     /**
  82.      * Set streetNumber
  83.      *
  84.      * @param string $streetNumber
  85.      *
  86.      * @return Address
  87.      */
  88.     public function setStreetNumber($streetNumber)
  89.     {
  90.         $this->streetNumber $streetNumber;
  91.         return $this;
  92.     }
  93.     /**
  94.      * Get streetNumber
  95.      *
  96.      * @return string
  97.      */
  98.     public function getStreetNumber()
  99.     {
  100.         return $this->streetNumber;
  101.     }
  102.     /**
  103.      * Set city
  104.      *
  105.      * @param string $city
  106.      *
  107.      * @return Address
  108.      */
  109.     public function setCity($city)
  110.     {
  111.         $this->city $city;
  112.         return $this;
  113.     }
  114.     /**
  115.      * Get city
  116.      *
  117.      * @return string
  118.      */
  119.     public function getCity()
  120.     {
  121.         return $this->city;
  122.     }
  123.     /**
  124.      * Set zipCode
  125.      *
  126.      * @param string $zipCode
  127.      *
  128.      * @return Address
  129.      */
  130.     public function setZipCode($zipCode)
  131.     {
  132.         $this->zipCode $zipCode;
  133.         return $this;
  134.     }
  135.     /**
  136.      * Get zipCode
  137.      *
  138.      * @return string
  139.      */
  140.     public function getZipCode()
  141.     {
  142.         return $this->zipCode;
  143.     }
  144.     /**
  145.      * Set country
  146.      *
  147.      * @param string $country
  148.      *
  149.      * @return Address
  150.      */
  151.     public function setCountry($country)
  152.     {
  153.         $this->country $country;
  154.         return $this;
  155.     }
  156.     /**
  157.      * Get country
  158.      *
  159.      * @return string
  160.      */
  161.     public function getCountry()
  162.     {
  163.         return $this->country;
  164.     }
  165. //    public function getContact(): ?Contact
  166. //    {
  167. //        return $this->contact;
  168. //    }
  169. //    public function setContact(?Contact $contact): self
  170. //    {
  171. //        $this->contact = $contact;
  172. //
  173. //        return $this;
  174. //    }
  175.     public function getDeliveryContact(): ?Contact
  176.     {
  177.         return $this->deliveryContact;
  178.     }
  179.     public function setDeliveryContact(?Contact $deliveryContact): self
  180.     {
  181.         $this->deliveryContact $deliveryContact;
  182.         return $this;
  183.     }
  184. }