File: /var/www/dvpis2025/dvpis.kaunokolegija.lt/src/Entity/ActivitiesPlan.php
<?php
namespace App\Entity;
use App\Repository\ActivitiesPlanRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\UniqueConstraint;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* ActivitiesPlan
*/
#[ORM\Table(name: 'activities_plan')]
#[UniqueConstraint(name: 'unique_idx', columns: ['lecturer_agreement_id', 'academic_unit_id'])]
#[ORM\Entity(repositoryClass: ActivitiesPlanRepository::class)]
#[UniqueEntity(fields: ['lecturerAgreement', 'academicUnit'], message: 'Toks įrašas jau egzistuoja', errorPath: 'entity')]
class ActivitiesPlan
{
#[ORM\Column]
#[ORM\Id]
#[ORM\GeneratedValue]
private ?int $id = null;
#[ORM\JoinColumn(name: 'academic_unit_id', referencedColumnName: 'id', nullable: false)]
#[ORM\ManyToOne(targetEntity: AcademicUnit::class, inversedBy: 'activitiesPlans')]
private ?AcademicUnit $academicUnit;
/**
* @var int
*/
#[ORM\Column(name: 'contact_hours', type: 'integer')]
private $contactHours;
/**
* @var int
*/
#[ORM\Column(name: 'other_hours', type: 'integer')]
private $otherHours;
/**
* @var int
*/
#[ORM\Column(name: 'sum_hours', type: 'integer')]
private $sumHours;
/**
* @var int
*/
#[ORM\Column(name: 'tmmv_hours', type: 'integer')]
private $tmmvHours;
/**
* @var int
*/
#[ORM\Column(name: 'meov_hours', type: 'integer')]
private $meovHours;
/**
* @var int
*/
#[ORM\Column(name: 'ktv_hours', type: 'integer')]
private $ktvHours;
/**
* @var string
*/
#[ORM\Column(name: 'description', type: 'text', nullable: true)]
private $description;
#[ORM\ManyToOne(inversedBy: 'activitiesPlans')]
#[ORM\JoinColumn(nullable: false)]
private ?LecturerAgreement $lecturerAgreement = null;
public function getId(): ?int
{
return $this->id;
}
/**
* @param int $id
*
* @return $this
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
public function getAcademicUnit(): ?AcademicUnit
{
return $this->academicUnit;
}
public function setAcademicUnit(?AcademicUnit $academicUnit): static
{
$this->academicUnit = $academicUnit;
return $this;
}
public function getContactHours(): ?int
{
return $this->contactHours;
}
public function setContactHours(int $contactHours): static
{
$this->contactHours = $contactHours;
return $this;
}
public function getOtherHours(): ?int
{
return $this->otherHours;
}
public function setOtherHours(int $otherHours): static
{
$this->otherHours = $otherHours;
return $this;
}
public function getSumHours(): ?int
{
return $this->sumHours;
}
public function setSumHours(int $sumHours): static
{
$this->sumHours = $sumHours;
return $this;
}
public function getTmmvHours(): ?int
{
return $this->tmmvHours;
}
public function setTmmvHours(int $tmmvHours): static
{
$this->tmmvHours = $tmmvHours;
return $this;
}
public function getMeovHours(): ?int
{
return $this->meovHours;
}
public function setMeovHours(int $meovHours): static
{
$this->meovHours = $meovHours;
return $this;
}
public function getKtvHours(): ?int
{
return $this->ktvHours;
}
public function setKtvHours(int $ktvHours): static
{
$this->ktvHours = $ktvHours;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): static
{
$this->description = $description;
return $this;
}
public function getLecturerAgreement(): ?LecturerAgreement
{
return $this->lecturerAgreement;
}
public function setLecturerAgreement(?LecturerAgreement $lecturerAgreement): static
{
$this->lecturerAgreement = $lecturerAgreement;
return $this;
}
}