src/Entity/Finance/MediaEarning.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Finance;
  3. use App\Entity\BaseEntity;
  4. use App\Entity\Media\Media;
  5. use App\Repository\Finance\MediaEarningRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=MediaEarningRepository::class)
  9.  * @ORM\HasLifecycleCallbacks()
  10.  */
  11. class MediaEarning extends BaseEntity
  12. {
  13.     /**
  14.      * @ORM\Column(type="integer", nullable=false)
  15.      */
  16.     private $month;
  17.     /**
  18.      * @ORM\Column(type="integer", nullable=false)
  19.      */
  20.     private $year;
  21.     /**
  22.      * @ORM\Column(type="float", nullable=false)
  23.      */
  24.     private $earningConfirmed;
  25.     /**
  26.      * @ORM\Column(type="float", nullable=false)
  27.      */
  28.     private $earningEstimated;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity="App\Entity\Media\Media", inversedBy="mediaEarnings")
  31.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  32.      */
  33.     private $media;
  34.     public function __construct()
  35.     {
  36.         $this->earningConfirmed 0;
  37.         $this->earningEstimated 0;
  38.     }
  39.     public function getMonth(): ?int
  40.     {
  41.         return $this->month;
  42.     }
  43.     public function setMonth(int $month): self
  44.     {
  45.         $this->month $month;
  46.         return $this;
  47.     }
  48.     public function getYear(): ?int
  49.     {
  50.         return $this->year;
  51.     }
  52.     public function setYear(int $year): self
  53.     {
  54.         $this->year $year;
  55.         return $this;
  56.     }
  57.     public function getEarningConfirmed(): ?float
  58.     {
  59.         return $this->earningConfirmed;
  60.     }
  61.     public function setEarningConfirmed(float $earningConfirmed): self
  62.     {
  63.         $this->earningConfirmed $earningConfirmed;
  64.         return $this;
  65.     }
  66.     public function getEarningEstimated(): ?float
  67.     {
  68.         return $this->earningEstimated;
  69.     }
  70.     public function setEarningEstimated(float $earningEstimated): self
  71.     {
  72.         $this->earningEstimated $earningEstimated;
  73.         return $this;
  74.     }
  75.     public function getMedia(): ?Media
  76.     {
  77.         return $this->media;
  78.     }
  79.     public function setMedia(?Media $media): self
  80.     {
  81.         $this->media $media;
  82.         return $this;
  83.     }
  84. }