src/Entity/ThirdParty/Address.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\ThirdParty;
  3. use App\Entity\User\Prefix;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8.  * Address
  9.  *
  10.  * @ORM\Table(name="addresses")
  11.  * @ORM\Entity(repositoryClass="App\Repository\ThirdParty\AddressRepository")
  12.  * @Gedmo\Loggable(logEntryClass="App\Entity\History\History")
  13.  */
  14. class Address
  15. {
  16.     /**
  17.      * @var int
  18.      *
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity="App\Entity\ThirdParty\ThirdParty", inversedBy="addresses")
  26.      * @ORM\JoinColumn(nullable=true)
  27.      */
  28.     private $thirdParty;
  29.     /**
  30.      * @var string
  31.      *
  32.      * @ORM\Column(name="organisation", type="string", length=255, nullable=true)
  33.      */
  34.     private $organisation;
  35.     /**
  36.      * @var int
  37.      *
  38.      * @ORM\ManyToOne(targetEntity="App\Entity\User\Prefix")
  39.      */
  40.     private $prefix;
  41.     /**
  42.      * @var string
  43.      *
  44.      * @ORM\Column(name="firstname", type="string", length=255, nullable=true)
  45.      */
  46.     private $firstname;
  47.     /**
  48.      * @var string
  49.      *
  50.      * @ORM\Column(name="lastname", type="string", length=255, nullable=true)
  51.      */
  52.     private $lastname;
  53.     /**
  54.      * @var string
  55.      *
  56.      * @ORM\Column(name="complement", type="string", length=255, nullable=true)
  57.      */
  58.     private $complement;
  59.     /**
  60.      * @var string
  61.      *
  62.      * @ORM\Column(name="address1", type="string", length=255)
  63.      * @Assert\NotBlank()
  64.      */
  65.     private $address1;
  66.     /**
  67.      * @var string
  68.      *
  69.      * @ORM\Column(name="address2", type="string", length=255, nullable=true)
  70.      */
  71.     private $address2;
  72.     /**
  73.      * @var int
  74.      *
  75.      * @ORM\Column(name="zipcode", type="integer")
  76.      * @Assert\NotBlank()
  77.      * @Assert\Type(type="numeric")
  78.      */
  79.     private $zipcode;
  80.     /**
  81.      * @var string
  82.      *
  83.      * @ORM\Column(name="city", type="string", length=255)
  84.      * @Assert\NotBlank()
  85.      */
  86.     private $city;
  87.     /**
  88.      * @var int
  89.      *
  90.      * @ORM\Column(name="country", type="string", length=255)
  91.      * @Assert\NotBlank()
  92.      */
  93.     private $country 'FR';
  94.     /**
  95.      * @ORM\Column(name="mobile_phone", type="string", length=255, nullable=true)
  96.      */
  97.     private $mobilePhone;
  98.     /**
  99.      * @ORM\Column(name="phone", type="string", length=255, nullable=true)
  100.      */
  101.     private $phone;
  102.     /**
  103.      * @var string
  104.      *
  105.      * @ORM\Column(name="email", type="string", length=255, nullable=true)
  106.      */
  107.     private $email;
  108.     /**
  109.      * @var \DateTime
  110.      *
  111.      * @Gedmo\Timestampable(on="create")
  112.      * @ORM\Column(name="created_date", type="datetime", nullable=false)
  113.      */
  114.     private $createdDate;
  115.     /**
  116.      * @var \DateTime
  117.      *
  118.      * @Gedmo\Timestampable(on="update")
  119.      * @ORM\Column(name="updated_date", type="datetime", nullable=true)
  120.      */
  121.     private $updatedDate;
  122.     /**
  123.      * @var bool
  124.      *
  125.      * @ORM\Column(name="status", type="boolean")
  126.      */
  127.     private $status true;
  128.     
  129.     
  130.     public function __clone()
  131.     {
  132.         $this->id null;
  133.         $this->setThirdParty(null);
  134.         $this->setCreatedDate(null);
  135.         $this->setUpdatedDate(null);
  136.     }
  137.     /**
  138.      * Get id
  139.      *
  140.      * @return int
  141.      */
  142.     public function getId()
  143.     {
  144.         return $this->id;
  145.     }
  146.     /**
  147.      * Set organisation
  148.      *
  149.      * @param string $organisation
  150.      *
  151.      * @return Address
  152.      */
  153.     public function setOrganisation($organisation)
  154.     {
  155.         $this->organisation $organisation;
  156.         return $this;
  157.     }
  158.     /**
  159.      * Get organisation
  160.      *
  161.      * @return string
  162.      */
  163.     public function getOrganisation()
  164.     {
  165.         return $this->organisation;
  166.     }
  167.     /**
  168.      * Set prefix
  169.      *
  170.      * @param \App\Entity\User\Prefix $prefix
  171.      *
  172.      * @return \App\Entity\User\User
  173.      */
  174.     public function setPrefix($prefix)
  175.     {
  176.         $this->prefix $prefix;
  177.         return $this;
  178.     }
  179.     /**
  180.      * Get prefix
  181.      *
  182.      * @return \App\Entity\User\Prefix $prefix
  183.      */
  184.     public function getPrefix()
  185.     {
  186.         return $this->prefix;
  187.     }
  188.     /**
  189.      * Set firstname
  190.      *
  191.      * @param string $firstname
  192.      *
  193.      * @return Address
  194.      */
  195.     public function setFirstname($firstname)
  196.     {
  197.         $this->firstname $firstname;
  198.         return $this;
  199.     }
  200.     /**
  201.      * Get firstname
  202.      *
  203.      * @return string
  204.      */
  205.     public function getFirstname()
  206.     {
  207.         return $this->firstname;
  208.     }
  209.     /**
  210.      * Set lastname
  211.      *
  212.      * @param string $lastname
  213.      *
  214.      * @return Address
  215.      */
  216.     public function setLastname($lastname)
  217.     {
  218.         $this->lastname $lastname;
  219.         return $this;
  220.     }
  221.     /**
  222.      * Get lastname
  223.      *
  224.      * @return string
  225.      */
  226.     public function getLastname()
  227.     {
  228.         return $this->lastname;
  229.     }
  230.     /**
  231.      * Set complement
  232.      *
  233.      * @param string $complement
  234.      *
  235.      * @return Address
  236.      */
  237.     public function setComplement($complement)
  238.     {
  239.         $this->complement $complement;
  240.         return $this;
  241.     }
  242.     /**
  243.      * Get complement
  244.      *
  245.      * @return string
  246.      */
  247.     public function getComplement()
  248.     {
  249.         return $this->complement;
  250.     }
  251.     /**
  252.      * Set address1
  253.      *
  254.      * @param string $address1
  255.      *
  256.      * @return Address
  257.      */
  258.     public function setAddress1($address1)
  259.     {
  260.         $this->address1 $address1;
  261.         return $this;
  262.     }
  263.     /**
  264.      * Get address1
  265.      *
  266.      * @return string
  267.      */
  268.     public function getAddress1()
  269.     {
  270.         return $this->address1;
  271.     }
  272.     /**
  273.      * Set address2
  274.      *
  275.      * @param string $address2
  276.      *
  277.      * @return Address
  278.      */
  279.     public function setAddress2($address2)
  280.     {
  281.         $this->address2 $address2;
  282.         return $this;
  283.     }
  284.     /**
  285.      * Get address2
  286.      *
  287.      * @return string
  288.      */
  289.     public function getAddress2()
  290.     {
  291.         return $this->address2;
  292.     }
  293.     /**
  294.      * Set zipcode
  295.      *
  296.      * @param integer $zipcode
  297.      *
  298.      * @return Address
  299.      */
  300.     public function setZipcode($zipcode)
  301.     {
  302.         $this->zipcode $zipcode;
  303.         return $this;
  304.     }
  305.     /**
  306.      * Get zipcode
  307.      *
  308.      * @return int
  309.      */
  310.     public function getZipcode()
  311.     {
  312.         return $this->zipcode;
  313.     }
  314.     /**
  315.      * Set city
  316.      *
  317.      * @param string $city
  318.      *
  319.      * @return Address
  320.      */
  321.     public function setCity($city)
  322.     {
  323.         $this->city $city;
  324.         return $this;
  325.     }
  326.     /**
  327.      * Get city
  328.      *
  329.      * @return string
  330.      */
  331.     public function getCity()
  332.     {
  333.         return $this->city;
  334.     }
  335.     /**
  336.      * Set country
  337.      *
  338.      * @param string $country
  339.      *
  340.      * @return Address
  341.      */
  342.     public function setCountry($country)
  343.     {
  344.         $this->country $country;
  345.         return $this;
  346.     }
  347.     /**
  348.      * Get country
  349.      *
  350.      * @return string
  351.      */
  352.     public function getCountry()
  353.     {
  354.         return $this->country;
  355.     }
  356.     /**
  357.      * Set mobilePhone
  358.      *
  359.      * @param string $mobilePhone
  360.      *
  361.      * @return Address
  362.      */
  363.     public function setMobilePhone($mobilePhone)
  364.     {
  365.         $this->mobilePhone $mobilePhone;
  366.         return $this;
  367.     }
  368.     /**
  369.      * Get mobilePhone
  370.      *
  371.      * @return libphonenumber\PhoneNumber
  372.      */
  373.     public function getMobilePhone()
  374.     {
  375.         return $this->mobilePhone;
  376.     }
  377.     /**
  378.      * Set phone
  379.      *
  380.      * @param string $phone
  381.      *
  382.      * @return Address
  383.      */
  384.     public function setPhone($phone)
  385.     {
  386.         $this->phone $phone;
  387.         return $this;
  388.     }
  389.     /**
  390.      * Get phone
  391.      *
  392.      * @return libphonenumber\PhoneNumber
  393.      */
  394.     public function getPhone()
  395.     {
  396.         return $this->phone;
  397.     }
  398.     /**
  399.      * Set email
  400.      *
  401.      * @param string $email
  402.      *
  403.      * @return Address
  404.      */
  405.     public function setEmail($email)
  406.     {
  407.         $this->email $email;
  408.         return $this;
  409.     }
  410.     /**
  411.      * Get email
  412.      *
  413.      * @return string
  414.      */
  415.     public function getEmail()
  416.     {
  417.         return $this->email;
  418.     }
  419.    /**
  420.      * Get createdDate
  421.      *
  422.      * @return \DateTime
  423.      */
  424.     public function getCreatedDate()
  425.     {
  426.         return $this->createdDate;
  427.     }
  428.     /**
  429.      * Get updatedDate
  430.      *
  431.      * @return \DateTime
  432.      */
  433.     public function getUpdatedDate()
  434.     {
  435.         return $this->updatedDate;
  436.     }
  437.    
  438.     /**
  439.      * Set status
  440.      *
  441.      * @param boolean $status
  442.      *
  443.      * @return \App\Entity\ThirdParty\Address
  444.      */
  445.     public function setStatus($status)
  446.     {
  447.         $this->status $status;
  448.         return $this;
  449.     }
  450.     /**
  451.      * Get status
  452.      *
  453.      * @return boolean
  454.      */
  455.     public function getStatus()
  456.     {
  457.         return $this->status;
  458.     }
  459.     /**
  460.      * Set thirdParty
  461.      *
  462.      * @param \App\Entity\ThirdParty\ThirdParty $thirdParty
  463.      *
  464.      * @return Address
  465.      */
  466.     public function setThirdParty(\App\Entity\ThirdParty\ThirdParty $thirdParty null)
  467.     {
  468.         $this->thirdParty $thirdParty;
  469.         return $this;
  470.     }
  471.     /**
  472.      * Get thirdParty
  473.      *
  474.      * @return \App\Entity\ThirdParty\ThirdParty
  475.      */
  476.     public function getThirdParty()
  477.     {
  478.         return $this->thirdParty;
  479.     }
  480. }