src/Entity/LocationCountry.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Common\SoftDeletableEntityTrait;
  4. use App\Entity\Common\StatefulEntityTrait;
  5. use App\Entity\Common\TimestampedEntityTrait;
  6. use Doctrine\ORM\Mapping\UniqueConstraint;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Gedmo\Mapping\Annotation as Gedmo;
  9. use Evence\Bundle\SoftDeleteableExtensionBundle\Mapping\Annotation as Evence;
  10. /**
  11.  * Class LocationCountry
  12.  *
  13.  * @ORM\Entity(repositoryClass="App\Repository\LocationCountryRepository")
  14.  * @ORM\Table(indexes={
  15.  *     @ORM\Index(name="IDX_updated_at", columns={"updated_at"}),
  16.  *     @ORM\Index(name="IDX_deleted_at", columns={"deleted_at"}),
  17.  *     @ORM\Index(name="IDX_is_active", columns={"is_active"})
  18.  * })
  19.  * @Gedmo\SoftDeleteable(fieldName="deletedAt")
  20.  */
  21. class LocationCountry
  22. {
  23.     use SoftDeletableEntityTraitStatefulEntityTraitTimestampedEntityTrait;
  24.     /**
  25.      * @var string
  26.      *
  27.      * @ORM\Id()
  28.      * @ORM\Column(length=6)
  29.      */
  30.     private $code;
  31.     /**
  32.      * @var string
  33.      *
  34.      * @ORM\Column(length=100)
  35.      */
  36.     private $name;
  37.     /**
  38.      * @var string|null
  39.      *
  40.      * @ORM\Column(length=6, nullable=true)
  41.      */
  42.     private $phoneCode null;
  43.     /**
  44.      * @var StaCurrency|null
  45.      *
  46.      * @ORM\ManyToOne(targetEntity="StaCurrency")
  47.      * @ORM\JoinColumn(referencedColumnName="code", name="currency_code", nullable=true)
  48.      */
  49.     private $currency;
  50.     /**
  51.      * @return string
  52.      */
  53.     public function getCode(): string
  54.     {
  55.         return $this->code;
  56.     }
  57.     /**
  58.      * @param string $code
  59.      * @return LocationCountry
  60.      */
  61.     public function setCode(string $code): LocationCountry
  62.     {
  63.         $this->code $code;
  64.         return $this;
  65.     }
  66.     /**
  67.      * @return string
  68.      */
  69.     public function getName(): string
  70.     {
  71.         return $this->name;
  72.     }
  73.     /**
  74.      * @param string $name
  75.      * @return LocationCountry
  76.      */
  77.     public function setName(string $name): LocationCountry
  78.     {
  79.         $this->name $name;
  80.         return $this;
  81.     }
  82.     /**
  83.      * @return string|null
  84.      */
  85.     public function getPhoneCode(): ?string
  86.     {
  87.         return $this->phoneCode;
  88.     }
  89.     /**
  90.      * @param string|null $phoneCode
  91.      * @return LocationCountry
  92.      */
  93.     public function setPhoneCode(?string $phoneCode): LocationCountry
  94.     {
  95.         $this->phoneCode $phoneCode;
  96.         return $this;
  97.     }
  98.     /**
  99.      * @return StaCurrency|null
  100.      */
  101.     public function getCurrency(): ?StaCurrency
  102.     {
  103.         return $this->currency;
  104.     }
  105.     /**
  106.      * @param StaCurrency|null $currency
  107.      * @return LocationCountry
  108.      */
  109.     public function setCurrency(?StaCurrency $currency): LocationCountry
  110.     {
  111.         $this->currency $currency;
  112.         return $this;
  113.     }
  114. }