<?php
namespace App\Entity;
use App\Repository\UserVouchersRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=UserVouchersRepository::class)
*/
class UserVouchers
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups("vouchers:read")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Users::class, inversedBy="userVouchers")
* @ORM\JoinColumn(nullable=false)
*/
private $user;
/**
* @ORM\Column(type="integer")
* @Groups("vouchers:read")
*/
private $voucher_points;
/**
* @ORM\ManyToOne(targetEntity=Partners::class, inversedBy="userVouchers")
* @ORM\JoinColumn(nullable=false)
* @Groups("with_partner")
*/
private $partner;
/**
* @ORM\Column(type="string", length=255)
* @Groups("vouchers:read")
*/
private $voucher_unique;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
* @Groups("vouchers:read")
*/
private $validated_at;
/**
* @ORM\Column(type="datetime_immutable")
* @Groups("vouchers:read")
*/
private $created_at;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $deleted_at;
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?Users
{
return $this->user;
}
public function setUser(?Users $user): self
{
$this->user = $user;
return $this;
}
public function getVoucherPoints(): ?int
{
return $this->voucher_points;
}
public function setVoucherPoints(int $voucher_points): self
{
$this->voucher_points = $voucher_points;
return $this;
}
public function getPartner(): ?Partners
{
return $this->partner;
}
public function setPartner(?Partners $partner): self
{
$this->partner = $partner;
return $this;
}
public function getVoucherUnique(): ?string
{
return $this->voucher_unique;
}
public function setVoucherUnique(string $voucher_unique): self
{
$this->voucher_unique = $voucher_unique;
return $this;
}
public function getValidatedAt(): ?\DateTimeImmutable
{
return $this->validated_at;
}
public function setValidatedAt(?\DateTimeImmutable $validated_at): self
{
$this->validated_at = $validated_at;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeImmutable $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getDeletedAt(): ?\DateTimeImmutable
{
return $this->deleted_at;
}
public function setDeletedAt(?\DateTimeImmutable $deleted_at): self
{
$this->deleted_at = $deleted_at;
return $this;
}
}