src/Entity/Insurance.php line 24

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 DateTime;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Gedmo\Mapping\Annotation as Gedmo;
  10. use Evence\Bundle\SoftDeleteableExtensionBundle\Mapping\Annotation as Evence;
  11. /**
  12.  * Class Insurance
  13.  *
  14.  * @ORM\Entity(repositoryClass="App\Repository\InsuranceRepository")
  15.  * @ORM\Table(indexes={
  16.  *     @ORM\Index(name="IDX_updated_at", columns={"updated_at"}),
  17.  *     @ORM\Index(name="IDX_deleted_at", columns={"deleted_at"}),
  18.  *     @ORM\Index(name="IDX_is_active", columns={"is_active"}) *
  19.  * })
  20.  * @Gedmo\SoftDeleteable(fieldName="deletedAt")
  21.  */
  22. class Insurance
  23. {
  24.     use SoftDeletableEntityTraitStatefulEntityTraitTimestampedEntityTrait;
  25.     /**
  26.      * @var integer
  27.      *
  28.      * @ORM\Id()
  29.      * @ORM\GeneratedValue
  30.      * @ORM\Column(type="integer")
  31.      */
  32.     private $id;
  33.     /**
  34.      * @var string
  35.      *
  36.      * @ORM\Column(length=100)
  37.      */
  38.     private $name;
  39.     /**
  40.      * @var float
  41.      *
  42.      * @ORM\Column(type="decimal", precision=13, scale=4)
  43.      */
  44.     private $price=0;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity="StaCurrency")
  47.      * @ORM\JoinColumn(name="currency_code", referencedColumnName="code", onDelete="CASCADE")
  48.      */
  49.     private $currency;
  50.     public function getId(): int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function setId(int $id): Insurance
  55.     {
  56.         $this->id $id;
  57.         return $this;
  58.     }
  59.     public function getName(): string
  60.     {
  61.         return $this->name;
  62.     }
  63.     public function setName(string $name): Insurance
  64.     {
  65.         $this->name $name;
  66.         return $this;
  67.     }
  68.     /**
  69.      * @return float|int
  70.      */
  71.     public function getPrice()
  72.     {
  73.         return $this->price;
  74.     }
  75.     /**
  76.      * @param float|int $price
  77.      * @return Insurance
  78.      */
  79.     public function setPrice($price)
  80.     {
  81.         $this->price $price;
  82.         return $this;
  83.     }
  84.     /**
  85.      * @return mixed
  86.      */
  87.     public function getCurrency()
  88.     {
  89.         return $this->currency;
  90.     }
  91.     /**
  92.      * @param mixed $currency
  93.      * @return Insurance
  94.      */
  95.     public function setCurrency($currency)
  96.     {
  97.         $this->currency $currency;
  98.         return $this;
  99.     }
  100. }