<?php
namespace App\Entity\Account;
use App\Entity\Location\Station;
use App\Entity\Service;
use App\Entity\User;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
#[ORM\Table(name: 'customer_profile_preferences')]
#[ORM\Entity]
class CustomerProfilePreference
{
#[ORM\Id]
#[ORM\Column(name: 'id', type: 'integer')]
#[ORM\GeneratedValue(strategy: 'AUTO')]
protected int $id;
#[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', nullable: true)]
#[ORM\OneToOne(targetEntity: User::class)]
protected ?Customer $user;
#[ORM\Column(name: 'min_age', type: 'smallint', nullable: true)]
protected ?int $minAge;
#[ORM\Column(name: 'max_age', type: 'smallint', nullable: true)]
protected ?int $maxAge;
#[ORM\Column(name: 'min_height', type: 'smallint', nullable: true)]
protected ?int $minHeight;
#[ORM\Column(name: 'max_height', type: 'smallint', nullable: true)]
protected ?int $maxHeight;
#[ORM\Column(name: 'min_breast_size', type: 'smallint', nullable: true)]
protected ?int $minBreastSize;
#[ORM\Column(name: 'max_breast_size', type: 'smallint', nullable: true)]
protected ?int $maxBreastSize;
/** @var int[] */
#[ORM\Column(name: 'nationality', type: 'simple_array', nullable: true)]
protected ?array $nationalities;
/** @var int[] */
#[ORM\Column(name: 'body_type', type: 'simple_array', nullable: true)]
protected ?array $bodyTypes;
/** @var int[] */
#[ORM\Column(name: 'hair_color', type: 'simple_array', nullable: true)]
protected ?array $hairColors;
/** @var int[] */
#[ORM\Column(name: 'private_haircut', type: 'simple_array', nullable: true)]
protected ?array $privateHaircuts;
#[ORM\Column(name: 'has_tattoo', type: 'boolean', nullable: true)]
protected ?bool $hasTattoo;
#[ORM\Column(name: 'has_piercing', type: 'boolean', nullable: true)]
protected ?bool $hasPiercing;
/** @var Station[] */
#[ORM\JoinTable(name: 'customer_profile_preference_stations')]
#[ORM\JoinColumn(name: 'customer_profile_preference_id', referencedColumnName: 'id')]
#[ORM\InverseJoinColumn(name: 'customer_profile_preference_station_id', referencedColumnName: 'id')]
#[ORM\ManyToMany(targetEntity: Station::class)]
protected Collection $stations;
#[ORM\Column(name: 'min_price', type: 'smallint', nullable: true)]
protected ?int $minPrice;
#[ORM\Column(name: 'max_price', type: 'smallint', nullable: true)]
protected ?int $maxPrice;
/** @var Service[] */
#[ORM\JoinTable(name: 'customer_profile_preference_services')]
#[ORM\JoinColumn(name: 'customer_profile_preference_id', referencedColumnName: 'id')]
#[ORM\InverseJoinColumn(name: 'customer_profile_preference_service_id', referencedColumnName: 'id')]
#[ORM\ManyToMany(targetEntity: Service::class)]
protected Collection $services;
/** @var int[] */
#[ORM\Column(name: 'client_types', type: 'simple_array', nullable: true)]
protected ?array $clientTypes;
#[ORM\Column(name: 'has_friend', type: 'boolean', nullable: true)]
protected ?bool $hasFriend;
#[ORM\Column(name: 'attached_to_saloon', type: 'boolean', nullable: true)]
protected ?bool $attachedToSaloon;
#[ORM\Column(name: 'has_selfie', type: 'boolean', nullable: true)]
protected ?bool $hasSelfie;
#[ORM\Column(name: 'has_video', type: 'boolean', nullable: true)]
protected ?bool $hasVideo;
#[ORM\Column(name: 'has_comments', type: 'boolean', nullable: true)]
protected ?bool $hasComments;
#[ORM\Column(name: 'is_approved', type: 'boolean', nullable: true)]
protected ?bool $isApproved;
#[Gedmo\Timestampable(on: "update")]
#[ORM\Column(name: 'updated_at', type: 'datetimetz_immutable')]
protected \DateTimeImmutable $updatedAt;
public function __construct(Customer $user, ?int $minAge = null, ?int $maxAge = null, ?int $minHeight = null, ?int $maxHeight = null,
?int $minBreastSize = null, ?int $maxBreastSize = null, ?int $nationality = null, ?int $bodyType = null, ?int $hairColor = null,
?int $privateHaircut = null, ?bool $hasTattoo = null, ?bool $hasPiercing = null, ?array $stations = null,
?int $minPrice = null, ?int $maxPrice = null, ?array $services = null, ?bool $hasFriend = null, ?bool $attachedToSaloon = null,
?bool $hasSelfie = null, ?bool $hasVideo = null, ?bool $hasComments = null, ?bool $isApproved = null)
{
$this->user = $user;
$this->minAge = $minAge;
$this->maxAge = $maxAge;
$this->minHeight = $minHeight;
$this->maxHeight = $maxHeight;
$this->minBreastSize = $minBreastSize;
$this->maxBreastSize = $maxBreastSize;
$this->nationalities = $nationality;
$this->bodyTypes = $bodyType;
$this->hairColors = $hairColor;
$this->privateHaircuts = $privateHaircut;
$this->hasTattoo = $hasTattoo;
$this->hasPiercing = $hasPiercing;
$this->stations = new ArrayCollection($stations ?? []);
$this->minPrice = $minPrice;
$this->maxPrice = $maxPrice;
$this->services = new ArrayCollection($services ?? []);
$this->hasFriend = $hasFriend;
$this->attachedToSaloon = $attachedToSaloon;
$this->hasSelfie = $hasSelfie;
$this->hasVideo = $hasVideo;
$this->hasComments = $hasComments;
$this->isApproved = $isApproved;
$this->stations = new ArrayCollection();
$this->services = new ArrayCollection();
// $this->updatedAt = CarbonImmutable::now();
}
public function getId(): int
{
return $this->id;
}
public function getUser(): User
{
return $this->user;
}
public function getMinAge(): ?int
{
return $this->minAge;
}
public function setMinAge(?int $minAge): void
{
$this->minAge = $minAge;
}
public function getMaxAge(): ?int
{
return $this->maxAge;
}
public function setMaxAge(?int $maxAge): void
{
$this->maxAge = $maxAge;
}
public function getMinHeight(): ?int
{
return $this->minHeight;
}
public function setMinHeight(?int $minHeight): void
{
$this->minHeight = $minHeight;
}
public function getMaxHeight(): ?int
{
return $this->maxHeight;
}
public function setMaxHeight(?int $maxHeight): void
{
$this->maxHeight = $maxHeight;
}
public function getMinBreastSize(): ?int
{
return $this->minBreastSize;
}
public function setMinBreastSize(?int $minBreastSize): void
{
$this->minBreastSize = $minBreastSize;
}
public function getMaxBreastSize(): ?int
{
return $this->maxBreastSize;
}
public function setMaxBreastSize(?int $maxBreastSize): void
{
$this->maxBreastSize = $maxBreastSize;
}
public function getNationalities(): ?array
{
return $this->nationalities;
}
public function setNationalities(?array $nationalities): void
{
$this->nationalities = $nationalities;
}
public function getBodyTypes(): ?array
{
return $this->bodyTypes;
}
public function setBodyTypes(?array $bodyTypes): void
{
$this->bodyTypes = $bodyTypes;
}
public function getHairColors(): ?array
{
return $this->hairColors;
}
public function setHairColors(?array $hairColors): void
{
$this->hairColors = $hairColors;
}
public function getPrivateHaircuts(): ?array
{
return $this->privateHaircuts;
}
public function setPrivateHaircuts(?array $privateHaircuts): void
{
$this->privateHaircuts = $privateHaircuts;
}
public function isHasTattoo(): ?bool
{
return $this->hasTattoo;
}
public function setHasTattoo(?bool $hasTattoo): void
{
$this->hasTattoo = $hasTattoo;
}
public function isHasPiercing(): ?bool
{
return $this->hasPiercing;
}
public function setHasPiercing(?bool $hasPiercing): void
{
$this->hasPiercing = $hasPiercing;
}
/**
* @return Station[]
*/
public function getStations(): Collection
{
return $this->stations;
}
/**
* @param Station[] $stations
*/
public function setStations(array $stations): void
{
$this->stations = new ArrayCollection($stations);
}
public function getMinPrice(): ?int
{
return $this->minPrice;
}
public function setMinPrice(?int $minPrice): void
{
$this->minPrice = $minPrice;
}
public function getMaxPrice(): ?int
{
return $this->maxPrice;
}
public function setMaxPrice(?int $maxPrice): void
{
$this->maxPrice = $maxPrice;
}
/**
* @return Service[]
*/
public function getServices(): Collection
{
return $this->services;
}
/**
* @param Service[] $services
*/
public function setServices(array $services): void
{
$this->services = new ArrayCollection($services);
}
public function getClientTypes(): ?array
{
return $this->clientTypes;
}
public function setClientTypes(?array $clientTypes): void
{
$this->clientTypes = $clientTypes;
}
public function isHasFriend(): ?bool
{
return $this->hasFriend;
}
public function setHasFriend(?bool $hasFriend): void
{
$this->hasFriend = $hasFriend;
}
public function isAttachedToSaloon(): ?bool
{
return $this->attachedToSaloon;
}
public function setAttachedToSaloon(?bool $attachedToSaloon): void
{
$this->attachedToSaloon = $attachedToSaloon;
}
public function isHasSelfie(): ?bool
{
return $this->hasSelfie;
}
public function setHasSelfie(?bool $hasSelfie): void
{
$this->hasSelfie = $hasSelfie;
}
public function isHasVideo(): ?bool
{
return $this->hasVideo;
}
public function setHasVideo(?bool $hasVideo): void
{
$this->hasVideo = $hasVideo;
}
public function isHasComments(): ?bool
{
return $this->hasComments;
}
public function setHasComments(?bool $hasComments): void
{
$this->hasComments = $hasComments;
}
public function isApproved(): ?bool
{
return $this->isApproved;
}
public function setIsApproved(?bool $isApproved): void
{
$this->isApproved = $isApproved;
}
public function getUpdatedAt(): \DateTimeImmutable
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeImmutable $updatedAt): void
{
$this->updatedAt = $updatedAt;
}
}