src/Entity/Geo/District.php line 16
<?php
namespace App\Entity\Geo;
use App\Entity\Traits\ActiveTrait;
use App\Entity\Traits\TrackerFields;
use App\Entity\Traits\UserCreatedInterface;
use App\Entity\Traits\UserUpdatedInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'federal_district')]
#[ORM\Entity(repositoryClass: 'App\Repository\Geo\DistrictRepository')]
#[ORM\HasLifecycleCallbacks]
class District implements UserCreatedInterface, UserUpdatedInterface
{
use TrackerFields;
use ActiveTrait;
/**
* @var ?int
*/
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private $id;
/**
* @var ?string
*/
#[ORM\Column(type: 'string')]
private $caption;
/**
* @var ?string
*/
#[ORM\Column(type: 'string', nullable: true)]
private $short_caption;
/**
* @var int
*/
#[ORM\Column(type: 'integer', nullable: false, options: ['default' => 10])]
private $weight = 10;
/**
* @var ArrayCollection
*/
#[ORM\OneToMany(targetEntity: 'App\Entity\Geo\Region', mappedBy: 'district')]
private $regions;
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @param int|null $id
*/
public function setId(?int $id): void
{
$this->id = $id;
}
/**
* @return string|null
*/
public function getCaption(): ?string
{
return $this->caption;
}
/**
* @param string|null $caption
*/
public function setCaption(?string $caption): void
{
$this->caption = $caption;
}
/**
* @return string|null
*/
public function getShortCaption(): ?string
{
return $this->short_caption;
}
/**
* @param string|null $short_caption
*/
public function setShortCaption(?string $short_caption): void
{
$this->short_caption = $short_caption;
}
/**
* @return int
*/
public function getWeight(): int
{
return $this->weight;
}
/**
* @param int $weight
*/
public function setWeight(int $weight): void
{
$this->weight = $weight;
}
/**
* @return Collection
*/
public function getRegions(): Collection
{
return $this->regions;
}
/**
* @param Collection $regions
*/
public function setRegions(Collection $regions): void
{
$this->regions = $regions;
}
}