<?php
namespace App\Entity;
use App\Repository\StripeInfoRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: StripeInfoRepository::class)]
class StripeInfo
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private $customerId;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $paymentMethodId;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $type;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $brand;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $expMonth;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $expYear;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $last4;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $iban;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $bankCode;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $branchCode;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $country;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $owner;
#[ORM\OneToOne(targetEntity: User::class, mappedBy: 'stripeInfo', cascade: ['persist', 'remove'])]
private $user;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $accountId;
public function getId(): ?int
{
return $this->id;
}
public function getCustomerId(): ?string
{
return $this->customerId;
}
public function setCustomerId(string $customerId): self
{
$this->customerId = $customerId;
return $this;
}
public function getPaymentMethodId(): ?string
{
return $this->paymentMethodId;
}
public function setPaymentMethodId(string $paymentMethodId): self
{
$this->paymentMethodId = $paymentMethodId;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getBrand(): ?string
{
return $this->brand;
}
public function setBrand(?string $brand): self
{
$this->brand = $brand;
return $this;
}
public function getExpMonth(): ?string
{
return $this->expMonth;
}
public function setExpMonth(?string $expMonth): self
{
$this->expMonth = $expMonth;
return $this;
}
public function getExpYear(): ?string
{
return $this->expYear;
}
public function setExpYear(?string $expYear): self
{
$this->expYear = $expYear;
return $this;
}
public function getLast4(): ?string
{
return $this->last4;
}
public function setLast4(?string $last4): self
{
$this->last4 = $last4;
return $this;
}
public function getIban(): ?string
{
return $this->iban;
}
public function setIban(?string $iban): self
{
$this->iban = $iban;
return $this;
}
public function getBankCode(): ?string
{
return $this->bankCode;
}
public function setBankCode(?string $bankCode): self
{
$this->bankCode = $bankCode;
return $this;
}
public function getBranchCode(): ?string
{
return $this->branchCode;
}
public function setBranchCode(?string $branchCode): self
{
$this->branchCode = $branchCode;
return $this;
}
public function getCountry(): ?string
{
return $this->country;
}
public function setCountry(?string $country): self
{
$this->country = $country;
return $this;
}
public function getOwner(): ?string
{
return $this->owner;
}
public function setOwner(?string $owner): self
{
$this->owner = $owner;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
// unset the owning side of the relation if necessary
if ($user === null && $this->user !== null) {
$this->user->setStripeInfo(null);
}
// set the owning side of the relation if necessary
if ($user !== null && $user->getStripeInfo() !== $this) {
$user->setStripeInfo($this);
}
$this->user = $user;
return $this;
}
public function getAccountId(): ?string
{
return $this->accountId;
}
public function setAccountId(?string $accountId): self
{
$this->accountId = $accountId;
return $this;
}
}