<?php
namespace App\Entity\Garages;
use App\Entity\AbstractBase;
use App\Entity\MiniAbstractBase;
use App\Enum\GarageSchedulesStatusEnum;
use App\Repository\Garages\GarageSchedulesRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Table(name="vulco_garage_schedules")
*
* @ORM\Entity(repositoryClass=GarageSchedulesRepository::class)
*
* @Gedmo\SoftDeleteable(fieldName="removedAt", timeAware=false)
*/
class GarageSchedules extends AbstractBase
{
/**
* @ORM\Column(type="integer", nullable=true, options={"default": 0})
*/
private ?int $mondayStatus = 0;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $mondayMorningBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $mondayMorningEnd = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $mondayAfternoonBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $mondayAfternoonEnd = null;
/**
* @ORM\Column(type="integer", nullable=true, options={"default": 0})
*/
private ?int $tuesdayStatus = 0;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $tuesdayMorningBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $tuesdayMorningEnd = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $tuesdayAfternoonBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $tuesdayAfternoonEnd = null;
/**
* @ORM\Column(type="integer", nullable=true, options={"default": 0})
*/
private ?int $wednesdayStatus = 0;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $wednesdayMorningBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $wednesdayMorningEnd = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $wednesdayAfternoonBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $wednesdayAfternoonEnd = null;
/**
* @ORM\Column(type="integer", nullable=true, options={"default": 0})
*/
private ?int $thursdayStatus = 0;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $thursdayMorningBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $thursdayMorningEnd = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $thursdayAfternoonBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $thursdayAfternoonEnd = null;
/**
* @ORM\Column(type="integer", nullable=true, options={"default": 0})
*/
private ?int $fridayStatus = 0;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $fridayMorningBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $fridayMorningEnd = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $fridayAfternoonBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $fridayAfternoonEnd = null;
/**
* @ORM\Column(type="integer", nullable=true, options={"default": 1})
*/
private ?int $saturdayStatus = 1;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $saturdayMorningBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $saturdayMorningEnd = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $saturdayAfternoonBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $saturdayAfternoonEnd = null;
/**
* @ORM\Column(type="integer", nullable=true, options={"default": 1})
*/
private ?int $sundayStatus = 1;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $sundayMorningBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $sundayMorningEnd = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $sundayAfternoonBegin = null;
/**
* @ORM\Column(type="time", nullable=true)
*/
private ?\DateTimeInterface $sundayAfternoonEnd = null;
public function getMondayStatus(): ?int
{
return $this->mondayStatus;
}
public function setMondayStatus(?int $mondayStatus): self
{
$this->mondayStatus = $mondayStatus;
return $this;
}
public function getMondayMorningBegin(): ?\DateTimeInterface
{
return $this->mondayMorningBegin;
}
public function setMondayMorningBegin(?\DateTimeInterface $mondayMorningBegin): self
{
$this->mondayMorningBegin = $mondayMorningBegin;
return $this;
}
public function getMondayMorningEnd(): ?\DateTimeInterface
{
return $this->mondayMorningEnd;
}
public function setMondayMorningEnd(?\DateTimeInterface $mondayMorningEnd): self
{
$this->mondayMorningEnd = $mondayMorningEnd;
return $this;
}
public function getMondayAfternoonBegin(): ?\DateTimeInterface
{
return $this->mondayAfternoonBegin;
}
public function setMondayAfternoonBegin(?\DateTimeInterface $mondayAfternoonBegin): self
{
$this->mondayAfternoonBegin = $mondayAfternoonBegin;
return $this;
}
public function getMondayAfternoonEnd(): ?\DateTimeInterface
{
return $this->mondayAfternoonEnd;
}
public function setMondayAfternoonEnd(?\DateTimeInterface $mondayAfternoonEnd): self
{
$this->mondayAfternoonEnd = $mondayAfternoonEnd;
return $this;
}
public function getTuesdayStatus(): ?int
{
return $this->tuesdayStatus;
}
public function setTuesdayStatus(?int $tuesdayStatus): self
{
$this->tuesdayStatus = $tuesdayStatus;
return $this;
}
public function getTuesdayMorningBegin(): ?\DateTimeInterface
{
return $this->tuesdayMorningBegin;
}
public function setTuesdayMorningBegin(?\DateTimeInterface $tuesdayMorningBegin): self
{
$this->tuesdayMorningBegin = $tuesdayMorningBegin;
return $this;
}
public function getTuesdayMorningEnd(): ?\DateTimeInterface
{
return $this->tuesdayMorningEnd;
}
public function setTuesdayMorningEnd(?\DateTimeInterface $tuesdayMorningEnd): self
{
$this->tuesdayMorningEnd = $tuesdayMorningEnd;
return $this;
}
public function getTuesdayAfternoonBegin(): ?\DateTimeInterface
{
return $this->tuesdayAfternoonBegin;
}
public function setTuesdayAfternoonBegin(?\DateTimeInterface $tuesdayAfternoonBegin): self
{
$this->tuesdayAfternoonBegin = $tuesdayAfternoonBegin;
return $this;
}
public function getTuesdayAfternoonEnd(): ?\DateTimeInterface
{
return $this->tuesdayAfternoonEnd;
}
public function setTuesdayAfternoonEnd(?\DateTimeInterface $tuesdayAfternoonEnd): self
{
$this->tuesdayAfternoonEnd = $tuesdayAfternoonEnd;
return $this;
}
public function getWednesdayStatus(): ?int
{
return $this->wednesdayStatus;
}
public function setWednesdayStatus(?int $wednesdayStatus): self
{
$this->wednesdayStatus = $wednesdayStatus;
return $this;
}
public function getWednesdayMorningBegin(): ?\DateTimeInterface
{
return $this->wednesdayMorningBegin;
}
public function setWednesdayMorningBegin(?\DateTimeInterface $wednesdayMorningBegin): self
{
$this->wednesdayMorningBegin = $wednesdayMorningBegin;
return $this;
}
public function getWednesdayMorningEnd(): ?\DateTimeInterface
{
return $this->wednesdayMorningEnd;
}
public function setWednesdayMorningEnd(?\DateTimeInterface $wednesdayMorningEnd): self
{
$this->wednesdayMorningEnd = $wednesdayMorningEnd;
return $this;
}
public function getWednesdayAfternoonBegin(): ?\DateTimeInterface
{
return $this->wednesdayAfternoonBegin;
}
public function setWednesdayAfternoonBegin(?\DateTimeInterface $wednesdayAfternoonBegin): self
{
$this->wednesdayAfternoonBegin = $wednesdayAfternoonBegin;
return $this;
}
public function getWednesdayAfternoonEnd(): ?\DateTimeInterface
{
return $this->wednesdayAfternoonEnd;
}
public function setWednesdayAfternoonEnd(?\DateTimeInterface $wednesdayAfternoonEnd): self
{
$this->wednesdayAfternoonEnd = $wednesdayAfternoonEnd;
return $this;
}
public function getThursdayStatus(): ?int
{
return $this->thursdayStatus;
}
public function setThursdayStatus(?int $thursdayStatus): self
{
$this->thursdayStatus = $thursdayStatus;
return $this;
}
public function getThursdayMorningBegin(): ?\DateTimeInterface
{
return $this->thursdayMorningBegin;
}
public function setThursdayMorningBegin(?\DateTimeInterface $thursdayMorningBegin): self
{
$this->thursdayMorningBegin = $thursdayMorningBegin;
return $this;
}
public function getThursdayMorningEnd(): ?\DateTimeInterface
{
return $this->thursdayMorningEnd;
}
public function setThursdayMorningEnd(?\DateTimeInterface $thursdayMorningEnd): self
{
$this->thursdayMorningEnd = $thursdayMorningEnd;
return $this;
}
public function getThursdayAfternoonBegin(): ?\DateTimeInterface
{
return $this->thursdayAfternoonBegin;
}
public function setThursdayAfternoonBegin(?\DateTimeInterface $thursdayAfternoonBegin): self
{
$this->thursdayAfternoonBegin = $thursdayAfternoonBegin;
return $this;
}
public function getThursdayAfternoonEnd(): ?\DateTimeInterface
{
return $this->thursdayAfternoonEnd;
}
public function setThursdayAfternoonEnd(?\DateTimeInterface $thursdayAfternoonEnd): self
{
$this->thursdayAfternoonEnd = $thursdayAfternoonEnd;
return $this;
}
public function getFridayStatus(): ?int
{
return $this->fridayStatus;
}
public function setFridayStatus(?int $fridayStatus): self
{
$this->fridayStatus = $fridayStatus;
return $this;
}
public function getFridayMorningBegin(): ?\DateTimeInterface
{
return $this->fridayMorningBegin;
}
public function setFridayMorningBegin(?\DateTimeInterface $fridayMorningBegin): self
{
$this->fridayMorningBegin = $fridayMorningBegin;
return $this;
}
public function getFridayMorningEnd(): ?\DateTimeInterface
{
return $this->fridayMorningEnd;
}
public function setFridayMorningEnd(?\DateTimeInterface $fridayMorningEnd): self
{
$this->fridayMorningEnd = $fridayMorningEnd;
return $this;
}
public function getFridayAfternoonBegin(): ?\DateTimeInterface
{
return $this->fridayAfternoonBegin;
}
public function setFridayAfternoonBegin(?\DateTimeInterface $fridayAfternoonBegin): self
{
$this->fridayAfternoonBegin = $fridayAfternoonBegin;
return $this;
}
public function getFridayAfternoonEnd(): ?\DateTimeInterface
{
return $this->fridayAfternoonEnd;
}
public function setFridayAfternoonEnd(?\DateTimeInterface $fridayAfternoonEnd): self
{
$this->fridayAfternoonEnd = $fridayAfternoonEnd;
return $this;
}
public function getSaturdayStatus(): ?int
{
return $this->saturdayStatus;
}
public function setSaturdayStatus(?int $saturdayStatus): self
{
$this->saturdayStatus = $saturdayStatus;
return $this;
}
public function getSaturdayMorningBegin(): ?\DateTimeInterface
{
return $this->saturdayMorningBegin;
}
public function setSaturdayMorningBegin(?\DateTimeInterface $saturdayMorningBegin): self
{
$this->saturdayMorningBegin = $saturdayMorningBegin;
return $this;
}
public function getSaturdayMorningEnd(): ?\DateTimeInterface
{
return $this->saturdayMorningEnd;
}
public function setSaturdayMorningEnd(?\DateTimeInterface $saturdayMorningEnd): self
{
$this->saturdayMorningEnd = $saturdayMorningEnd;
return $this;
}
public function getSaturdayAfternoonBegin(): ?\DateTimeInterface
{
return $this->saturdayAfternoonBegin;
}
public function setSaturdayAfternoonBegin(?\DateTimeInterface $saturdayAfternoonBegin): self
{
$this->saturdayAfternoonBegin = $saturdayAfternoonBegin;
return $this;
}
public function getSaturdayAfternoonEnd(): ?\DateTimeInterface
{
return $this->saturdayAfternoonEnd;
}
public function setSaturdayAfternoonEnd(?\DateTimeInterface $saturdayAfternoonEnd): self
{
$this->saturdayAfternoonEnd = $saturdayAfternoonEnd;
return $this;
}
public function getSundayStatus(): ?int
{
return $this->sundayStatus;
}
public function setSundayStatus(?int $sundayStatus): self
{
$this->sundayStatus = $sundayStatus;
return $this;
}
public function getSundayMorningBegin(): ?\DateTimeInterface
{
return $this->sundayMorningBegin;
}
public function setSundayMorningBegin(?\DateTimeInterface $sundayMorningBegin): self
{
$this->sundayMorningBegin = $sundayMorningBegin;
return $this;
}
public function getSundayMorningEnd(): ?\DateTimeInterface
{
return $this->sundayMorningEnd;
}
public function setSundayMorningEnd(?\DateTimeInterface $sundayMorningEnd): self
{
$this->sundayMorningEnd = $sundayMorningEnd;
return $this;
}
public function getSundayAfternoonBegin(): ?\DateTimeInterface
{
return $this->sundayAfternoonBegin;
}
public function setSundayAfternoonBegin(?\DateTimeInterface $sundayAfternoonBegin): self
{
$this->sundayAfternoonBegin = $sundayAfternoonBegin;
return $this;
}
public function getSundayAfternoonEnd(): ?\DateTimeInterface
{
return $this->sundayAfternoonEnd;
}
public function setSundayAfternoonEnd(?\DateTimeInterface $sundayAfternoonEnd): self
{
$this->sundayAfternoonEnd = $sundayAfternoonEnd;
return $this;
}
public function diff(GarageSchedules $schedules): array
{
$diff = array();
// monday
if ($this->mondayStatus !== $schedules->mondayStatus) {
$diff[] = ['select.weekdays.monday', GarageSchedulesStatusEnum::getTranslations()[$this->mondayStatus]];
}
if ($this->mondayMorningBegin !== $schedules->mondayMorningBegin) {
$diff[] = ['garage_schedules.monday.morning_begin', $this->getTimeAsString($this->mondayMorningBegin)];
}
if ($this->mondayMorningEnd !== $schedules->mondayMorningEnd) {
$diff[] = ['garage_schedules.monday.morning_end', $this->getTimeAsString($this->mondayMorningEnd)];
}
if ($this->mondayAfternoonBegin !== $schedules->mondayAfternoonBegin) {
$diff[] = ['garage_schedules.monday.afternoon_begin', $this->getTimeAsString($this->mondayAfternoonBegin)];
}
if ($this->mondayAfternoonEnd !== $schedules->mondayAfternoonEnd) {
$diff[] = ['garage_schedules.monday.afternoon_end', $this->getTimeAsString($this->mondayAfternoonEnd)];
}
// tuesday
if ($this->tuesdayStatus !== $schedules->tuesdayStatus) {
$diff[] = ['select.weekdays.tuesday', GarageSchedulesStatusEnum::getTranslations()[$this->tuesdayStatus]];
}
if ($this->tuesdayMorningBegin !== $schedules->tuesdayMorningBegin) {
$diff[] = ['garage_schedules.tuesday.morning_begin', $this->getTimeAsString($this->tuesdayMorningBegin)];
}
if ($this->tuesdayMorningEnd !== $schedules->tuesdayMorningEnd) {
$diff[] = ['garage_schedules.tuesday.morning_end', $this->getTimeAsString($this->tuesdayMorningEnd)];
}
if ($this->tuesdayAfternoonBegin !== $schedules->tuesdayAfternoonBegin) {
$diff[] = ['garage_schedules.tuesday.afternoon_begin', $this->getTimeAsString($this->tuesdayAfternoonBegin)];
}
if ($this->tuesdayAfternoonEnd !== $schedules->tuesdayAfternoonEnd) {
$diff[] = ['garage_schedules.tuesday.afternoon_end', $this->getTimeAsString($this->tuesdayAfternoonEnd)];
}
// wednesday
if ($this->wednesdayStatus !== $schedules->wednesdayStatus) {
$diff[] = ['select.weekdays.wednesday', GarageSchedulesStatusEnum::getTranslations()[$this->wednesdayStatus]];
}
if ($this->wednesdayMorningBegin !== $schedules->wednesdayMorningBegin) {
$diff[] = ['garage_schedules.wednesday.morning_begin', $this->getTimeAsString($this->wednesdayMorningBegin)];
}
if ($this->wednesdayMorningEnd !== $schedules->wednesdayMorningEnd) {
$diff[] = ['garage_schedules.wednesday.morning_end', $this->getTimeAsString($this->wednesdayMorningEnd)];
}
if ($this->wednesdayAfternoonBegin !== $schedules->wednesdayAfternoonBegin) {
$diff[] = ['garage_schedules.wednesday.afternoon_begin', $this->getTimeAsString($this->wednesdayAfternoonBegin)];
}
if ($this->wednesdayAfternoonEnd !== $schedules->wednesdayAfternoonEnd) {
$diff[] = ['garage_schedules.wednesday.afternoon_end', $this->getTimeAsString($this->wednesdayAfternoonEnd)];
}
// thursday
if ($this->thursdayStatus !== $schedules->thursdayStatus) {
$diff[] = ['select.weekdays.thursday', GarageSchedulesStatusEnum::getTranslations()[$this->thursdayStatus]];
}
if ($this->thursdayMorningBegin !== $schedules->thursdayMorningBegin) {
$diff[] = ['garage_schedules.thursday.morning_begin', $this->getTimeAsString($this->thursdayMorningBegin)];
}
if ($this->thursdayMorningEnd !== $schedules->thursdayMorningEnd) {
$diff[] = ['garage_schedules.thursday.morning_end', $this->getTimeAsString($this->thursdayMorningEnd)];
}
if ($this->thursdayAfternoonBegin !== $schedules->thursdayAfternoonBegin) {
$diff[] = ['garage_schedules.thursday.afternoon_begin', $this->getTimeAsString($this->thursdayAfternoonBegin)];
}
if ($this->thursdayAfternoonEnd !== $schedules->thursdayAfternoonEnd) {
$diff[] = ['garage_schedules.thursday.afternoon_end', $this->getTimeAsString($this->thursdayAfternoonEnd)];
}
// friday
if ($this->fridayStatus !== $schedules->fridayStatus) {
$diff[] = ['select.weekdays.friday', GarageSchedulesStatusEnum::getTranslations()[$this->fridayStatus]];
}
if ($this->fridayMorningBegin !== $schedules->fridayMorningBegin) {
$diff[] = ['garage_schedules.friday.morning_begin', $this->getTimeAsString($this->fridayMorningBegin)];
}
if ($this->fridayMorningEnd !== $schedules->fridayMorningEnd) {
$diff[] = ['garage_schedules.friday.morning_end', $this->getTimeAsString($this->fridayMorningEnd)];
}
if ($this->fridayAfternoonBegin !== $schedules->fridayAfternoonBegin) {
$diff[] = ['garage_schedules.friday.afternoon_begin', $this->getTimeAsString($this->fridayAfternoonBegin)];
}
if ($this->fridayAfternoonEnd !== $schedules->fridayAfternoonEnd) {
$diff[] = ['garage_schedules.friday.afternoon_end', $this->getTimeAsString($this->fridayAfternoonEnd)];
}
// saturday
if ($this->saturdayStatus !== $schedules->saturdayStatus) {
$diff[] = ['select.weekdays.saturday', GarageSchedulesStatusEnum::getTranslations()[$this->saturdayStatus]];
}
if ($this->saturdayMorningBegin !== $schedules->saturdayMorningBegin) {
$diff[] = ['garage_schedules.saturday.morning_begin', $this->getTimeAsString($this->saturdayMorningBegin)];
}
if ($this->saturdayMorningEnd !== $schedules->saturdayMorningEnd) {
$diff[] = ['garage_schedules.saturday.morning_end', $this->getTimeAsString($this->saturdayMorningEnd)];
}
if ($this->saturdayAfternoonBegin !== $schedules->saturdayAfternoonBegin) {
$diff[] = ['garage_schedules.saturday.afternoon_begin', $this->getTimeAsString($this->saturdayAfternoonBegin)];
}
if ($this->saturdayAfternoonEnd !== $schedules->saturdayAfternoonEnd) {
$diff[] = ['garage_schedules.saturday.afternoon_end', $this->getTimeAsString($this->saturdayAfternoonEnd)];
}
// sunday
if ($this->sundayStatus !== $schedules->sundayStatus) {
$diff[] = ['select.weekdays.sunday', GarageSchedulesStatusEnum::getTranslations()[$this->sundayStatus]];
}
if ($this->sundayMorningBegin !== $schedules->sundayMorningBegin) {
$diff[] = ['garage_schedules.sunday.morning_begin', $this->getTimeAsString($this->sundayMorningBegin)];
}
if ($this->sundayMorningEnd !== $schedules->sundayMorningEnd) {
$diff[] = ['garage_schedules.sunday.morning_end', $this->getTimeAsString($this->sundayMorningEnd)];
}
if ($this->sundayAfternoonBegin !== $schedules->sundayAfternoonBegin) {
$diff[] = ['garage_schedules.sunday.afternoon_begin', $this->getTimeAsString($this->sundayAfternoonBegin)];
}
if ($this->sundayAfternoonEnd !== $schedules->sundayAfternoonEnd) {
$diff[] = ['garage_schedules.sunday.afternoon_end', $this->getTimeAsString($this->sundayAfternoonEnd)];
}
return $diff;
}
}