src/Entity/TokenCrm.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiProperty;
  4. use App\Repository\TokenCrmRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Timestampable\Traits\TimestampableEntity;
  7. use Ramsey\Uuid\Doctrine\UuidGenerator;
  8. use Symfony\Component\Serializer\Annotation\Groups;
  9. use Symfony\Component\Serializer\Annotation\SerializedName;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. /**
  12.  * @ORM\Entity(repositoryClass=TokenCrmRepository::class)
  13.  */
  14. class TokenCrm
  15. {
  16.     /**
  17.      * Hook timestampable behavior
  18.      * updates createdAt, updatedAt fields
  19.      */
  20.     use TimestampableEntity;
  21.     /**
  22.      * @ORM\Id
  23.      * @ORM\Column(type="uuid", unique=true)
  24.      * @ORM\GeneratedValue(strategy="CUSTOM")
  25.      * @ORM\CustomIdGenerator(class=UuidGenerator::class)
  26.      * @SerializedName("id")
  27.      * @ApiProperty(identifier=true)
  28.      * @Assert\Uuid()
  29.      */
  30.     private string $id;
  31.     /**
  32.      * @ORM\Column(type="string", length=2048)
  33.      * @SerializedName("bearer_token")
  34.      */
  35.     private string $bearerToken;
  36.     /**
  37.      * @ORM\Column(type="integer")
  38.      * @SerializedName("expires_in")
  39.      */
  40.     private int $expiresIn;
  41.     /**
  42.      * @return string
  43.      */
  44.     public function getId(): ?string
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getBearerToken(): string
  49.     {
  50.         return $this->bearerToken;
  51.     }
  52.     public function setBearerToken(string $bearerToken): self
  53.     {
  54.         $this->bearerToken $bearerToken;
  55.         return $this;
  56.     }
  57.     public function getExpiresIn(): int
  58.     {
  59.         return $this->expiresIn;
  60.     }
  61.     public function setExpiresIn(int $expiresIn): self
  62.     {
  63.         $this->expiresIn $expiresIn;
  64.         return $this;
  65.     }
  66.     /**
  67.      * @SerializedName("created_at")
  68.      */
  69.     public function getCreatedAtTimestampable(): ?\DateTimeInterface
  70.     {
  71.         return $this->createdAt;
  72.     }
  73. }