This commit is contained in:
2022-02-25 09:29:28 +01:00
parent c4e0b68ebe
commit 051ed19f97
11 changed files with 82 additions and 81 deletions

View File

@@ -44,7 +44,6 @@ abstract class AbstractElement
private ?string $comment;
/**
*
* @ORM\Column(name="endDate", type="datetime_immutable", nullable=true)
* @Assert\GreaterThan(
* propertyPath="startDate",
@@ -53,13 +52,6 @@ abstract class AbstractElement
*/
private ?DateTimeImmutable $endDate;
/**
* @ORM\ManyToOne(
* targetEntity="\Chill\PersonBundle\Entity\Person"
* )
*/
private ?Person $person = null;
/**
* @ORM\ManyToOne(
* targetEntity="\Chill\PersonBundle\Entity\Household\Household"
@@ -68,19 +60,24 @@ abstract class AbstractElement
private ?Household $household = null;
/**
*
* @ORM\ManyToOne(
* targetEntity="\Chill\PersonBundle\Entity\Person"
* )
*/
private ?Person $person = null;
/**
* @ORM\Column(name="startDate", type="datetime_immutable")
* @Assert\Date
*/
private DateTimeImmutable $startDate;
/**
*
* @ORM\Column(name="type", type="string", length=255)
*/
private string $type;
/**Getters and Setters */
/*Getters and Setters */
public function getAmount(): float
{
@@ -97,16 +94,16 @@ abstract class AbstractElement
return $this->endDate;
}
public function getPerson(): ?Person
{
return $this->person;
}
public function getHousehold(): ?Household
{
return $this->household;
}
public function getPerson(): ?Person
{
return $this->person;
}
public function getStartDate(): DateTimeImmutable
{
return $this->startDate;
@@ -153,16 +150,16 @@ abstract class AbstractElement
return $this;
}
public function setPerson(Person $person): self
public function setHousehold(Household $household): self
{
$this->person = $person;
$this->household = $household;
return $this;
}
public function setHousehold(Household $household): self
public function setPerson(Person $person): self
{
$this->household = $household;
$this->person = $person;
return $this;
}