parent
57529e871e
commit
fbc49281d1
@ -0,0 +1,50 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Component\Customer\Domain;
|
||||||
|
|
||||||
|
#[ORM\Entity, ORM\Table(name:"customers")]
|
||||||
|
class Customer
|
||||||
|
{
|
||||||
|
#[ORM\Id, ORM\GeneratedValue(strategy: 'AUTO')]
|
||||||
|
#[ORM\Column(type:Types::INTEGER)]
|
||||||
|
private int $id;
|
||||||
|
|
||||||
|
#[ORM\OneToOne(mappedBy:"user", targetEntity: User::class)]
|
||||||
|
#[ORM\JoinTable(name:"users")]
|
||||||
|
#[ORM\JoinColumn(name: "user_id", referencedColumnName: "id")]
|
||||||
|
#[ORM\InverseJoinColumn(name: "id", referencedColumnName: "user_id")]
|
||||||
|
protected User $user;
|
||||||
|
|
||||||
|
#[ORM\Column(type:Types::STRING, length:255)]
|
||||||
|
private string $lastname;
|
||||||
|
|
||||||
|
#[ORM\Column(type:Types::STRING, length:255)]
|
||||||
|
private string $firstname;
|
||||||
|
|
||||||
|
#[ORM\Column(type:Types::STRING, length:10)]
|
||||||
|
private string $phoneNumber;
|
||||||
|
|
||||||
|
#[ORM\Column(type:Types::STRING, length:3)]
|
||||||
|
private string $callSign;
|
||||||
|
|
||||||
|
#[ORM\Column(type:Types::String, length:255)]
|
||||||
|
private string $email;
|
||||||
|
|
||||||
|
#[ORM\Column(type:Types::String, length:255)]
|
||||||
|
private string $adresse;
|
||||||
|
|
||||||
|
#[ORM\Column(type:Types::String, length:150)]
|
||||||
|
private string $country;
|
||||||
|
|
||||||
|
#[ORM\Column(type:Types::String, length:25)]
|
||||||
|
private string $postcode;
|
||||||
|
|
||||||
|
#[ORM\Column(type:Types::String, length:100)]
|
||||||
|
private string $city;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
public \DateTime $created;
|
||||||
|
|
||||||
|
#[ORM\Column]
|
||||||
|
public \DateTime $updated;
|
||||||
|
}
|
@ -1 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace App\Component\Customer\Domain;
|
||||||
|
|
||||||
|
interface CustomerDataMapper
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace App\Component\Customer\Domain;
|
||||||
|
|
||||||
|
interface CustomerRepository
|
||||||
|
{
|
||||||
|
public function findById(int $id): Customer;
|
||||||
|
public function findAll(): array;
|
||||||
|
}
|
Loading…
Reference in new issue