src/Entity/Reference/ReferenceTransactionFeesPayment.php line 28

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Reference;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\Reference\ReferenceTransactionFeesPaymentRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. /**
  8.  * @ApiResource(
  9.  *     security= "is_granted('ROLE_AGENT') or is_granted('ROLE_MANAGER')",
  10.  *     normalizationContext={"groups"={"reference-transaction-fees-payment:read"}, "swagger_definition_name"="Read"},
  11.  *     denormalizationContext={"groups"={"reference-transaction-fees-payment:write"}, "swagger_definition_name"="Write"},
  12.  *     itemOperations={
  13.  *          "get"
  14.  *     },
  15.  *     collectionOperations={
  16.  *           "get",
  17.  *
  18.  *     },
  19.  *     attributes={
  20.  *          "formats"={"jsonld", "json", "html", "jsonhal", "csv"={"text/csv"} }
  21.  *     }
  22.  * )
  23.  * @ORM\Entity(repositoryClass=ReferenceTransactionFeesPaymentRepository::class)
  24.  */
  25. class ReferenceTransactionFeesPayment
  26. {
  27.     public const TRANSLATION_DOMAIN 'reference_transaction_type';
  28.     public const REFERENCE_FEES_PAID_BY_BUYER 'reference.fees.paid.by.BUYER';
  29.     public const REFERENCE_FEES_PAID_BY_SELLER 'reference.fees.paid.by.SELLER';
  30.     public const REFERENCE_FEES_PAID_BY_BUYER_SELLER 'reference.fees.paid.by.BUYER.SELLER';
  31.     public const REFERENCE_CODE_FEES_PAID_BY_BUYER '1B';
  32.     public const REFERENCE_CODE_FEES_PAID_BY_SELLER '2S';
  33.     public const REFERENCE_CODE_FEES_PAID_BY_BUYER_SELLER '3BS';
  34.     public const ALL_FEES_PAYMENT = [
  35.         self::REFERENCE_FEES_PAID_BY_BUYER,
  36.         self::REFERENCE_FEES_PAID_BY_SELLER,
  37.         self::REFERENCE_FEES_PAID_BY_BUYER_SELLER
  38.     ];
  39.     public const ALL_FEES_CODE_PAYMENT = [
  40.         self::REFERENCE_CODE_FEES_PAID_BY_BUYER,
  41.         self::REFERENCE_CODE_FEES_PAID_BY_SELLER,
  42.         self::REFERENCE_CODE_FEES_PAID_BY_BUYER_SELLER
  43.     ];
  44.     /**
  45.      * @ORM\Id
  46.      * @ORM\GeneratedValue
  47.      * @ORM\Column(type="integer")
  48.      *
  49.      * @Groups({
  50.      *    "transaction-item:read",
  51.      *    "reference-transaction-fees-payment:read",
  52.      *    "business-indication:item:read"
  53.      * })
  54.      */
  55.     private $id;
  56.     /**
  57.      * @ORM\Column(type="string", length=255)
  58.      *
  59.      * @Groups({
  60.      *    "transaction-item:read",
  61.      *    "reference-transaction-fees-payment:read",
  62.      *    "business-indication:item:read"
  63.      * })
  64.      */
  65.     private ?string $name;
  66.     /**
  67.      * @ORM\Column(type="string", length=255)
  68.      *
  69.      * @Groups({
  70.      *    "transaction-item:read",
  71.      *    "reference-transaction-fees-payment:read",
  72.      *    "business-indication:item:read"
  73.      * })
  74.      */
  75.     private ?string $code;
  76.     public function getId(): ?int
  77.     {
  78.         return $this->id;
  79.     }
  80.     public function getName(): ?string
  81.     {
  82.         return $this->name;
  83.     }
  84.     public function setName(string $name): self
  85.     {
  86.         $this->name $name;
  87.         return $this;
  88.     }
  89.     public function getCode(): ?string
  90.     {
  91.         return $this->code;
  92.     }
  93.     public function setCode(string $code): self
  94.     {
  95.         $this->code $code;
  96.         return $this;
  97.     }
  98. }