Files
chill-bundles/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php

213 lines
4.1 KiB
PHP

<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\AsideActivityBundle\Entity;
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Entity\User;
use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(schema="chill_asideactivity")
*/
class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
{
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=false)
* @Assert\NotBlank
*/
private \Chill\MainBundle\Entity\User $agent;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=false)
*/
private \Chill\MainBundle\Entity\User $createdBy;
/**
* @ORM\Column(type="datetime")
*/
private $date;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?DateTimeInterface $duration = null;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private ?int $id = null;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $location;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $note;
/**
* @ORM\ManyToOne(targetEntity=AsideActivityCategory::class, inversedBy="asideActivities")
* @ORM\JoinColumn(nullable=false)
*/
private $type;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @ORM\ManyToOne(targetEntity=User::class)
*/
private \Chill\MainBundle\Entity\User $updatedBy;
public function getAgent(): ?User
{
return $this->agent;
}
public function getCreatedAt(): ?DateTimeInterface
{
return $this->createdAt;
}
public function getCreatedBy(): ?User
{
return $this->createdBy;
}
public function getDate(): ?DateTimeInterface
{
return $this->date;
}
public function getDuration(): ?DateTimeInterface
{
return $this->duration;
}
public function getId(): ?int
{
return $this->id;
}
public function getLocation(): ?string
{
return $this->location;
}
public function getNote(): ?string
{
return $this->note;
}
public function getType(): ?AsideActivityCategory
{
return $this->type;
}
public function getUpdatedAt(): ?DateTimeInterface
{
return $this->updatedAt;
}
public function getUpdatedBy(): ?User
{
return $this->updatedBy;
}
public function setAgent(?User $agent): self
{
$this->agent = $agent;
return $this;
}
public function setCreatedAt(DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function setCreatedBy(?User $createdBy): self
{
$this->createdBy = $createdBy;
return $this;
}
public function setDate(DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function setDuration(?DateTimeInterface $duration): self
{
$this->duration = $duration;
return $this;
}
public function setLocation(?string $location): self
{
$this->location = $location;
return $this;
}
public function setNote(?string $note): self
{
$this->note = $note;
return $this;
}
public function setType(?AsideActivityCategory $type): self
{
$this->type = $type;
return $this;
}
public function setUpdatedAt(DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function setUpdatedBy(?User $updatedBy): self
{
$this->updatedBy = $updatedBy;
return $this;
}
}