fix : corrections de l'entity customer.php et de la partie admin front qui lui est lié + update des fixtures/seed

This commit is contained in:
tristan
2026-02-13 13:44:21 +01:00
parent c361ef9bb9
commit 93edd0a563
11 changed files with 462 additions and 54 deletions
+32 -12
View File
@@ -47,13 +47,17 @@ class Customer
#[Groups(['shipment:read', 'customer:read'])]
private ?int $id = null;
#[ORM\Column(length: 255)]
#[ORM\Column(length: 180)]
#[Groups(['customer:read', 'customer:write', 'shipment:read'])]
private ?string $label = null;
private string $name = '';
#[ORM\Column(length: 255)]
#[ORM\Column(length: 180, nullable: true)]
#[Groups(['customer:read', 'customer:write', 'shipment:read'])]
private ?string $code = null;
private ?string $email = null;
#[ORM\Column(length: 40, nullable: true)]
#[Groups(['customer:read', 'customer:write', 'shipment:read'])]
private ?string $phone = null;
/**
* @var Collection<int, Address>
@@ -74,24 +78,40 @@ class Customer
return $this->id;
}
public function getLabel(): ?string
public function getName(): string
{
return $this->label;
return $this->name;
}
public function setLabel(?string $label): void
public function setName(string $name): self
{
$this->label = $label;
$this->name = $name;
return $this;
}
public function getCode(): ?string
public function getEmail(): ?string
{
return $this->code;
return $this->email;
}
public function setCode(?string $code): void
public function setEmail(?string $email): self
{
$this->code = $code;
$this->email = $email;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getAddresses(): Collection