Files
crm_ecosplay/src/Entity/Revendeur.php
Serreau Jovann ecc9ec82b7 feat: ajout champs Stripe Connect state sur Revendeur
src/Entity/Revendeur.php:
- stripeConnectState: string(30) default 'not_started', etat global
  de l'onboarding Stripe Connect du revendeur
- stripeConnectStatePayment: string(30) nullable, etat de la capacite
  de reception de paiements (enabled/disabled/pending)
- stripeConnectStatePayout: string(30) nullable, etat de la capacite
  de versement des fonds (enabled/disabled/pending)
- Getters/setters fluent pour les 3 champs

migrations/Version20260402210431.php:
- Ajout colonnes stripe_connect_state DEFAULT 'not_started',
  stripe_connect_state_payment nullable,
  stripe_connect_state_payout nullable sur la table revendeur

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 23:04:41 +02:00

323 lines
7.0 KiB
PHP

<?php
namespace App\Entity;
use App\Repository\RevendeurRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: RevendeurRepository::class)]
class Revendeur
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\OneToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
private User $user;
#[ORM\Column(length: 10, unique: true)]
private string $codeRevendeur;
#[ORM\Column(length: 255, nullable: true)]
private ?string $raisonSociale = null;
#[ORM\Column(length: 14, nullable: true)]
private ?string $siret = null;
#[ORM\Column(length: 500, nullable: true)]
private ?string $address = null;
#[ORM\Column(length: 10, nullable: true)]
private ?string $zipCode = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $city = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $email = null;
#[ORM\Column(length: 20, nullable: true)]
private ?string $phone = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $stripeConnectId = null;
#[ORM\Column(length: 30, options: ['default' => 'not_started'])]
private string $stripeConnectState = 'not_started';
#[ORM\Column(length: 30, nullable: true)]
private ?string $stripeConnectStatePayment = null;
#[ORM\Column(length: 30, nullable: true)]
private ?string $stripeConnectStatePayout = null;
#[ORM\Column]
private bool $isUseStripe = false;
#[ORM\Column(length: 500, nullable: true)]
private ?string $contratResellerPdfUnsigned = null;
#[ORM\Column(length: 500, nullable: true)]
private ?string $contratResellerPdfSigned = null;
#[ORM\Column(length: 500, nullable: true)]
private ?string $contratResellerPdfAudit = null;
#[ORM\Column(nullable: true)]
private ?int $contratSubmitterId = null;
#[ORM\Column]
private bool $isActive = true;
#[ORM\Column]
private \DateTimeImmutable $createdAt;
#[ORM\Column(nullable: true)]
private ?\DateTimeImmutable $updatedAt = null;
public function __construct(User $user, string $codeRevendeur)
{
$this->user = $user;
$this->codeRevendeur = $codeRevendeur;
$this->createdAt = new \DateTimeImmutable();
}
public function getId(): ?int
{
return $this->id;
}
public function getUser(): User
{
return $this->user;
}
public function getCodeRevendeur(): string
{
return $this->codeRevendeur;
}
public function getRaisonSociale(): ?string
{
return $this->raisonSociale;
}
public function setRaisonSociale(?string $raisonSociale): static
{
$this->raisonSociale = $raisonSociale;
return $this;
}
public function getSiret(): ?string
{
return $this->siret;
}
public function setSiret(?string $siret): static
{
$this->siret = $siret;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(?string $address): static
{
$this->address = $address;
return $this;
}
public function getZipCode(): ?string
{
return $this->zipCode;
}
public function setZipCode(?string $zipCode): static
{
$this->zipCode = $zipCode;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): static
{
$this->city = $city;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): static
{
$this->email = $email;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): static
{
$this->phone = $phone;
return $this;
}
public function getStripeConnectId(): ?string
{
return $this->stripeConnectId;
}
public function setStripeConnectId(?string $stripeConnectId): static
{
$this->stripeConnectId = $stripeConnectId;
return $this;
}
public function getStripeConnectState(): string
{
return $this->stripeConnectState;
}
public function setStripeConnectState(string $stripeConnectState): static
{
$this->stripeConnectState = $stripeConnectState;
return $this;
}
public function getStripeConnectStatePayment(): ?string
{
return $this->stripeConnectStatePayment;
}
public function setStripeConnectStatePayment(?string $stripeConnectStatePayment): static
{
$this->stripeConnectStatePayment = $stripeConnectStatePayment;
return $this;
}
public function getStripeConnectStatePayout(): ?string
{
return $this->stripeConnectStatePayout;
}
public function setStripeConnectStatePayout(?string $stripeConnectStatePayout): static
{
$this->stripeConnectStatePayout = $stripeConnectStatePayout;
return $this;
}
public function isUseStripe(): bool
{
return $this->isUseStripe;
}
public function setIsUseStripe(bool $isUseStripe): static
{
$this->isUseStripe = $isUseStripe;
return $this;
}
public function getContratResellerPdfUnsigned(): ?string
{
return $this->contratResellerPdfUnsigned;
}
public function setContratResellerPdfUnsigned(?string $path): static
{
$this->contratResellerPdfUnsigned = $path;
return $this;
}
public function getContratResellerPdfSigned(): ?string
{
return $this->contratResellerPdfSigned;
}
public function setContratResellerPdfSigned(?string $path): static
{
$this->contratResellerPdfSigned = $path;
return $this;
}
public function getContratResellerPdfAudit(): ?string
{
return $this->contratResellerPdfAudit;
}
public function setContratResellerPdfAudit(?string $path): static
{
$this->contratResellerPdfAudit = $path;
return $this;
}
public function getContratSubmitterId(): ?int
{
return $this->contratSubmitterId;
}
public function setContratSubmitterId(?int $contratSubmitterId): static
{
$this->contratSubmitterId = $contratSubmitterId;
return $this;
}
public function isActive(): bool
{
return $this->isActive;
}
public function setIsActive(bool $isActive): static
{
$this->isActive = $isActive;
return $this;
}
public function getCreatedAt(): \DateTimeImmutable
{
return $this->createdAt;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeImmutable $updatedAt): static
{
$this->updatedAt = $updatedAt;
return $this;
}
}