add birthday to persons entity

This commit is contained in:
Babak Alizadeh 2023-11-05 12:48:12 -08:00
parent ffc57cdcf2
commit 44625b9686
2 changed files with 17 additions and 0 deletions

View file

@ -69,6 +69,8 @@ class PersonsController extends AbstractController
$person->setNikename($params['nikename']); $person->setNikename($params['nikename']);
if(array_key_exists('name',$params)) if(array_key_exists('name',$params))
$person->setName($params['name']); $person->setName($params['name']);
if(array_key_exists('birthday',$params))
$person->setBirthday($params['birthday']);
if(array_key_exists('tel',$params)) if(array_key_exists('tel',$params))
$person->setTel($params['tel']); $person->setTel($params['tel']);
if(array_key_exists('address',$params)) if(array_key_exists('address',$params))

View file

@ -107,6 +107,9 @@ class Person
#[ORM\OneToMany(mappedBy: 'Person', targetEntity: StoreroomTicket::class)] #[ORM\OneToMany(mappedBy: 'Person', targetEntity: StoreroomTicket::class)]
private Collection $storeroomTickets; private Collection $storeroomTickets;
#[ORM\Column(length: 255, nullable: true)]
private ?string $birthday = null;
public function __construct() public function __construct()
{ {
$this->hesabdariRows = new ArrayCollection(); $this->hesabdariRows = new ArrayCollection();
@ -527,4 +530,16 @@ class Person
return $this; return $this;
} }
public function getBirthday(): ?string
{
return $this->birthday;
}
public function setBirthday(?string $birthday): static
{
$this->birthday = $birthday;
return $this;
}
} }