src/V4/Model/QuoteReason/QuoteReason.php line 37

Open in your IDE?
  1. <?php
  2. namespace App\V4\Model\QuoteReason;
  3. use ApiPlatform\Core\Annotation\ApiProperty;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use App\Model\IriNormalizableInterface;
  6. use App\Model\NormalizeAsIRITrait;
  7. use App\Model\QuoteState\QuoteState;
  8. use App\Model\Traits\ImportableObjectTrait;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Symfony\Component\Serializer\Annotation\Groups;
  11. /**
  12.  * @ApiResource(
  13.  *     shortName="V4/QuoteReason",
  14.  *     attributes={
  15.  *         "denormalization_context": {
  16.  *             "api_allow_update": true
  17.  *         }
  18.  *     },
  19.  *     collectionOperations={
  20.  *         "get": {
  21.  *             "normalization_context": {
  22.  *                 "groups": {"quote_reason:list"},
  23.  *                 "enable_max_depth": true
  24.  *             },
  25.  *             "security": "is_granted(constant('App\\V4\\Voters\\QuoteVoter::QUOTE_REASON_ADD_EDIT'), 'App\V4\Voters\QuoteVoter')"
  26.  *         }
  27.  *         },
  28.  *     itemOperations={
  29.  *     },
  30.  *     paginationClientEnabled=true,
  31.  *     paginationClientItemsPerPage=true
  32.  * )
  33.  */
  34. class QuoteReason implements IriNormalizableInterface
  35. {
  36.     use NormalizeAsIRITrait;
  37.     use ImportableObjectTrait;
  38.     /**
  39.      * @ApiProperty(identifier=true)
  40.      *
  41.      * @var string|null
  42.      * @Groups({
  43.      *     "quote_reason:list", "quote_reason:read",
  44.      *     "quote:list", "quote:read"
  45.      * })
  46.      */
  47.     private $id;
  48.     /**
  49.      * @var string|null
  50.      * @ORM\Column(type="string", length=255)
  51.      * @Groups({
  52.      *     "quote_reason:list",
  53.      *     "quote:list", "quote:read"
  54.      * })
  55.      */
  56.     private $name;
  57.     /**
  58.      * @var string|null
  59.      * @Groups({
  60.      *     "quote_reason:list",
  61.      *     "quote:list", "quote:read"
  62.      * })
  63.      */
  64.     private $customerId;
  65.     /**
  66.      * @var string|null
  67.      * @Groups({
  68.      *     "quote_reason:list", "quote_reason:read",
  69.      *     "quote:list", "quote:read"
  70.      * })
  71.      */
  72.     private $order;
  73.     /**
  74.      * @var QuoteState|null
  75.      * @Groups({
  76.      *     "quote_reason:list", "quote_reason:read",
  77.      *     "quote:list", "quote:read"
  78.      * })
  79.      */
  80.     private $quoteState;
  81.     /**
  82.      * @return string|null
  83.      */
  84.     public function getId(): ?string
  85.     {
  86.         return $this->id;
  87.     }
  88.     /**
  89.      * @param string|null $id
  90.      *
  91.      * @return QuoteReason
  92.      */
  93.     public function setId(?string $id): self
  94.     {
  95.         $this->id $id;
  96.         return $this;
  97.     }
  98.     /**
  99.      * @return string|null
  100.      */
  101.     public function getName(): ?string
  102.     {
  103.         return $this->name;
  104.     }
  105.     /**
  106.      * @param string|null $name
  107.      *
  108.      * @return QuoteReason
  109.      */
  110.     public function setName(?string $name): self
  111.     {
  112.         $this->name $name;
  113.         return $this;
  114.     }
  115.     /**
  116.      * @return string|null
  117.      */
  118.     public function getCustomerId(): ?string
  119.     {
  120.         return $this->customerId;
  121.     }
  122.     /**
  123.      * @param string|null $customerId
  124.      *
  125.      * @return QuoteReason
  126.      */
  127.     public function setCustomerId(?string $customerId): self
  128.     {
  129.         $this->customerId $customerId;
  130.         return $this;
  131.     }
  132.     /**
  133.      * @return string|null
  134.      */
  135.     public function getOrder(): ?string
  136.     {
  137.         return $this->order;
  138.     }
  139.     /**
  140.      * @param string|null $order
  141.      *
  142.      * @return QuoteReason
  143.      */
  144.     public function setOrder(?string $order): self
  145.     {
  146.         $this->order $order;
  147.         return $this;
  148.     }
  149.     /**
  150.      * @return QuoteState|null
  151.      */
  152.     public function getQuoteState(): ?QuoteState
  153.     {
  154.         return $this->quoteState;
  155.     }
  156.     /**
  157.      * @param QuoteState|null $quoteState
  158.      *
  159.      * @return QuoteReason
  160.      */
  161.     public function setQuoteState(?QuoteState $quoteState): self
  162.     {
  163.         $this->quoteState $quoteState;
  164.         return $this;
  165.     }
  166. }