src/Entity/Address.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. /**
  6.  * Address.
  7.  *
  8.  * @ORM\Entity
  9.  *
  10.  * @ORM\Table(name="address")
  11.  *
  12.  * @ORM\InheritanceType("SINGLE_TABLE")
  13.  *
  14.  * @ORM\DiscriminatorColumn(name="type", type="string")
  15.  *
  16.  * @ORM\DiscriminatorMap({"shipping" = "ShippingAddress"})
  17.  */
  18. abstract class Address
  19. {
  20.     /**
  21.      * @var int
  22.      *
  23.      * @ORM\Id
  24.      *
  25.      * @ORM\GeneratedValue(strategy="AUTO")
  26.      *
  27.      * @ORM\Column(name="id", type="integer")
  28.      */
  29.     private $id;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="address", type="string", length=255, nullable=true)
  34.      *
  35.      * @Assert\NotBlank(groups={"custom_estimate"}, message="assert.user.pro.source.not_blank")
  36.      */
  37.     private $address;
  38.     /**
  39.      * @var string
  40.      *
  41.      * @ORM\Column(type="string", length=255, nullable=true)
  42.      */
  43.     private $addressComplement;
  44.     /**
  45.      * @var string
  46.      *
  47.      * @ORM\Column(name="zipCode", type="string", length=255, nullable=true)
  48.      *
  49.      * @Assert\NotBlank(groups={"custom_estimate"}, message="assert.user.pro.source.not_blank")
  50.      */
  51.     private $zipCode;
  52.     /**
  53.      * @var string
  54.      *
  55.      * @ORM\Column(name="city", type="string", length=255, nullable=true)
  56.      *
  57.      * @Assert\NotBlank(groups={"custom_estimate"}, message="assert.user.pro.source.not_blank")
  58.      */
  59.     private $city;
  60.     /**
  61.      * @var string
  62.      *
  63.      * @ORM\Column(name="country", type="string", length=255, nullable=true)
  64.      *
  65.      * @Assert\NotBlank(groups={"custom_estimate"}, message="assert.user.pro.source.not_blank")
  66.      */
  67.     private $country;
  68.     /**
  69.      * Get id.
  70.      *
  71.      * @return int
  72.      */
  73.     public function getId()
  74.     {
  75.         return $this->id;
  76.     }
  77.     /**
  78.      * Set address.
  79.      *
  80.      * @param string $address
  81.      *
  82.      * @return Address
  83.      */
  84.     public function setAddress($address)
  85.     {
  86.         $this->address $address;
  87.         return $this;
  88.     }
  89.     /**
  90.      * Get address.
  91.      *
  92.      * @return string
  93.      */
  94.     public function getAddress()
  95.     {
  96.         return $this->address;
  97.     }
  98.     /**
  99.      * Set addressComplement.
  100.      *
  101.      * @param string $addressComplement
  102.      *
  103.      * @return Address
  104.      */
  105.     public function setAddressComplement($addressComplement)
  106.     {
  107.         $this->addressComplement $addressComplement;
  108.         return $this;
  109.     }
  110.     /**
  111.      * Get addressComplement.
  112.      *
  113.      * @return string
  114.      */
  115.     public function getAddressComplement()
  116.     {
  117.         return $this->addressComplement;
  118.     }
  119.     /**
  120.      * Set zipCode.
  121.      *
  122.      * @param string $zipCode
  123.      *
  124.      * @return Address
  125.      */
  126.     public function setZipCode($zipCode)
  127.     {
  128.         $this->zipCode $zipCode;
  129.         return $this;
  130.     }
  131.     /**
  132.      * Get zipCode.
  133.      *
  134.      * @return string
  135.      */
  136.     public function getZipCode()
  137.     {
  138.         return $this->zipCode;
  139.     }
  140.     /**
  141.      * Set city.
  142.      *
  143.      * @param string $city
  144.      *
  145.      * @return Address
  146.      */
  147.     public function setCity($city)
  148.     {
  149.         $this->city $city;
  150.         return $this;
  151.     }
  152.     /**
  153.      * Get city.
  154.      *
  155.      * @return string
  156.      */
  157.     public function getCity()
  158.     {
  159.         return $this->city;
  160.     }
  161.     /**
  162.      * Set country.
  163.      *
  164.      * @param string $country
  165.      *
  166.      * @return Address
  167.      */
  168.     public function setCountry($country)
  169.     {
  170.         $this->country $country;
  171.         return $this;
  172.     }
  173.     /**
  174.      * Get country.
  175.      *
  176.      * @return string
  177.      */
  178.     public function getCountry()
  179.     {
  180.         return $this->country;
  181.     }
  182. }