<?php
namespace App\Entity\Reference;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\Reference\ReferenceTransactionFeesPaymentRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ApiResource(
* security= "is_granted('ROLE_AGENT') or is_granted('ROLE_MANAGER')",
* normalizationContext={"groups"={"reference-transaction-fees-payment:read"}, "swagger_definition_name"="Read"},
* denormalizationContext={"groups"={"reference-transaction-fees-payment:write"}, "swagger_definition_name"="Write"},
* itemOperations={
* "get"
* },
* collectionOperations={
* "get",
*
* },
* attributes={
* "formats"={"jsonld", "json", "html", "jsonhal", "csv"={"text/csv"} }
* }
* )
* @ORM\Entity(repositoryClass=ReferenceTransactionFeesPaymentRepository::class)
*/
class ReferenceTransactionFeesPayment
{
public const TRANSLATION_DOMAIN = 'reference_transaction_type';
public const REFERENCE_FEES_PAID_BY_BUYER = 'reference.fees.paid.by.BUYER';
public const REFERENCE_FEES_PAID_BY_SELLER = 'reference.fees.paid.by.SELLER';
public const REFERENCE_FEES_PAID_BY_BUYER_SELLER = 'reference.fees.paid.by.BUYER.SELLER';
public const REFERENCE_CODE_FEES_PAID_BY_BUYER = '1B';
public const REFERENCE_CODE_FEES_PAID_BY_SELLER = '2S';
public const REFERENCE_CODE_FEES_PAID_BY_BUYER_SELLER = '3BS';
public const ALL_FEES_PAYMENT = [
self::REFERENCE_FEES_PAID_BY_BUYER,
self::REFERENCE_FEES_PAID_BY_SELLER,
self::REFERENCE_FEES_PAID_BY_BUYER_SELLER
];
public const ALL_FEES_CODE_PAYMENT = [
self::REFERENCE_CODE_FEES_PAID_BY_BUYER,
self::REFERENCE_CODE_FEES_PAID_BY_SELLER,
self::REFERENCE_CODE_FEES_PAID_BY_BUYER_SELLER
];
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*
* @Groups({
* "transaction-item:read",
* "reference-transaction-fees-payment:read",
* "business-indication:item:read"
* })
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*
* @Groups({
* "transaction-item:read",
* "reference-transaction-fees-payment:read",
* "business-indication:item:read"
* })
*/
private ?string $name;
/**
* @ORM\Column(type="string", length=255)
*
* @Groups({
* "transaction-item:read",
* "reference-transaction-fees-payment:read",
* "business-indication:item:read"
* })
*/
private ?string $code;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(string $code): self
{
$this->code = $code;
return $this;
}
}