<?php
/*
* @since 1.0.0
* @copyright Copyright (C) 2021 ArtMedia. All rights reserved.
* @website http://artmedia.biz.pl
* @author Arkadiusz Tobiasz
* @email kontakt@artmedia.biz.pl
*/
namespace App\Entity\Profile\Type;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use App\Entity\Profile;
/**
* @ORM\Entity(repositoryClass="App\Repository\Profile\Type\PersonRepository")
* @ORM\Table(name="profile_person")
*/
class Person extends Profile
{
public const GENDER_NOT_SPECIFIED = 'not_specified';
public const GENDER_MALE = 'male';
public const GENDER_FEMALE = 'female';
public const GENDERS = [
self::GENDER_NOT_SPECIFIED,
self::GENDER_MALE,
self::GENDER_FEMALE,
];
public const TRANSPORT_NOT_SPECIFIED = 'not_specified';
public const TRANSPORT_PUBLIC = 'public_transport';
public const TRANSPORT_OWN = 'own_transport';
public const TRANSPORT = [
self::TRANSPORT_NOT_SPECIFIED,
self::TRANSPORT_PUBLIC,
self::TRANSPORT_OWN,
];
/**
* @var string
*
* @ORM\Column(type="string", columnDefinition="enum('not_specified', 'public_transport', 'own_transport')")
*/
private $transport = self::TRANSPORT_NOT_SPECIFIED;
public function __construct()
{
parent::__construct();
$this->transport = self::TRANSPORT_NOT_SPECIFIED;
}
public function getTransport(): ?string
{
return $this->transport;
}
public function setTransport(string $transport): self
{
$this->transport = $transport;
return $this;
}
public function getType(): string
{
return Profile::TYPE_PERSON;
}
}