<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity()
* @ORM\Table(name="availability")
*
* Defines the properties of the Tag entity to represent the subcategory tags.
*
* See https://symfony.com/doc/current/doctrine.html#creating-an-entity-class
*
* @author Yonel Ceruto <yonelceruto@gmail.com>
*/
class Availability {
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private ?int $id = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private \DateTime $lastupdate;
/**
* @ORM\Column(type="string", nullable=true)
*/
private ?string $availabilitytype = null;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $enabled;
/**
* @ORM\Column(type="array", nullable=true)
*/
private $datesstart;
/**
* @ORM\Column(type="array", nullable=true)
*/
private $unavailabilities;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private ?string $daysbefore = null;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private ?string $duration = null;
/**
* @ORM\OneToOne(targetEntity="App\Entity\Experience", inversedBy="availability", cascade={"persist", "remove"})
* @ORM\JoinColumn(name="experience_id", referencedColumnName="id", nullable=true)
*/
protected $experience;
public function __construct() {
$this->lastupdate = new \DateTime('now');
$this->enabled = 1;
}
public function getId(): ?int {
return $this->id;
}
public function getLastupdate(): \DateTime {
return $this->lastupdate;
}
public function getAvailabilitytype(): ?string {
return $this->availabilitytype;
}
public function getEnabled() {
return $this->enabled;
}
public function getDatesstart() {
return $this->datesstart;
}
public function getUnavailabilities() {
return $this->unavailabilities;
}
public function getDaysbefore(): ?string {
return $this->daysbefore;
}
public function getDuration(): ?string {
return $this->duration;
}
public function getExperience() {
return $this->experience;
}
public function setId(?int $id): void {
$this->id = $id;
}
public function setLastupdate(\DateTime $lastupdate): void {
$this->lastupdate = $lastupdate;
}
public function setAvailabilitytype(?string $availabilitytype): void {
$this->availabilitytype = $availabilitytype;
}
public function setEnabled($enabled): void {
$this->enabled = $enabled;
}
public function setDatesstart($datesstart): void {
$this->datesstart = $datesstart;
}
public function setUnavailabilities($unavailabilities): void {
$this->unavailabilities = $unavailabilities;
}
public function setDaysbefore(?string $daysbefore): void {
$this->daysbefore = $daysbefore;
}
public function setDuration(?string $duration): void {
$this->duration = $duration;
}
public function setExperience($experience): void {
$this->experience = $experience;
}
}