<?php
namespace App\Entity\Otpusk;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\Otpusk\CitiesWeightRepository")
*
* @ORM\Table(
* name="citiesWeight",
* uniqueConstraints={@ORM\UniqueConstraint(name="indexUnique", columns={"cityId", "month"})}, indexes={@ORM\Index(name="index2", columns={"cityId", "month"})},
* options={"collate"="utf8"},
* )
*/
class CitiesWeight
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="smallint", options={"unsigned"=true})
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Otpusk\City", inversedBy="citiesWeights", cascade={"persist"})
* @ORM\JoinColumn(name="cityId", referencedColumnName="rec_id", nullable=false, columnDefinition="INT UNSIGNED NOT NULL")
*/
private $city;
/**
* @ORM\Column(type="integer")
*/
private $month;
/**
* @ORM\Column(type="decimal", precision=4, scale=2)
*/
private $weight;
public function getId(): ?int
{
return $this->id;
}
public function getCity(): ?City
{
return $this->city;
}
public function setCity(?City $city): self
{
$this->city = $city;
return $this;
}
public function getMonth(): ?int
{
return $this->month;
}
public function setMonth(int $month): self
{
$this->month = $month;
return $this;
}
public function getWeight(): ?string
{
return $this->weight;
}
public function setWeight(string $weight): self
{
$this->weight = $weight;
return $this;
}
}