mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
make somes changes on model: to manage isVisible field option + others
This commit is contained in:
@@ -29,7 +29,7 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private ?LocationType $type = null;
|
||||
private ?LocationType $locationType = null;
|
||||
|
||||
/**
|
||||
* @ORM\OneToOne(targetEntity=Address::class, cascade={"persist", "remove"})
|
||||
@@ -104,14 +104,14 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getType(): ?LocationType
|
||||
public function getLocationType(): ?LocationType
|
||||
{
|
||||
return $this->type;
|
||||
return $this->locationType;
|
||||
}
|
||||
|
||||
public function setType(?LocationType $type): self
|
||||
public function setLocationType(?LocationType $locationType): self
|
||||
{
|
||||
$this->type = $type;
|
||||
$this->locationType = $locationType;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
@@ -12,9 +12,9 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
*/
|
||||
class LocationType
|
||||
{
|
||||
const STATUS_OPTIONAL = 'facultatif';
|
||||
const STATUS_REQUIRED = 'obligatoire';
|
||||
const STATUS_NEVER = 'jamais';
|
||||
const STATUS_OPTIONAL = 'optional';
|
||||
const STATUS_REQUIRED = 'required';
|
||||
const STATUS_NEVER = 'never';
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
@@ -37,16 +37,16 @@ class LocationType
|
||||
private bool $availableForUsers = true;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=32)
|
||||
* @ORM\Column(type="string", length=32, options={"default"="optional"})
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private ?string $addressRequired = null;
|
||||
private string $addressRequired = self::STATUS_OPTIONAL;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=32)
|
||||
* @ORM\Column(type="string", length=32, options={"default"="optional"})
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private ?string $contactData = null;
|
||||
private string $contactData = self::STATUS_OPTIONAL;
|
||||
|
||||
|
||||
public function getId(): ?int
|
||||
|
Reference in New Issue
Block a user