src/Entity/Accounts/UserSocial.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Accounts;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * Usersocial
  7.  *
  8.  * @ORM\Table(name="otp_accounts.userSocial", uniqueConstraints={@ORM\UniqueConstraint(name="social", columns={"social", "soc_user_id"})}, indexes={@ORM\Index(name="soc_user_id", columns={"soc_user_id"}), @ORM\Index(name="user_id", columns={"user_id"}), @ORM\Index(name="access_token", columns={"access_token"})})
  9.  * @ORM\Entity
  10.  */
  11. class UserSocial
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true})
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="IDENTITY")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var int
  23.      *
  24.      * @ORM\Column(name="user_id", type="integer", nullable=false, options={"unsigned"=true,"comment"="id пользователя"})
  25.      */
  26.     private $userId;
  27.     /**
  28.      * @var string
  29.      *
  30.      * @ORM\Column(name="social", type="string", length=0, nullable=false, options={"comment"="соцсеть"})
  31.      */
  32.     private $social;
  33.     /**
  34.      * @var string
  35.      *
  36.      * @ORM\Column(name="access_token", type="string", length=255, nullable=false, options={"fixed"=true,"comment"="ключ доступа, полученный в результате успешной авторизации приложения"})
  37.      */
  38.     private $accessToken;
  39.     /**
  40.      * @var string
  41.      *
  42.      * @ORM\Column(name="soc_user_id", type="string", length=30, nullable=false, options={"fixed"=true,"comment"="идентификатор пользователя в соцсети"})
  43.      */
  44.     private $socUserId;
  45.     /**
  46.      * @var string
  47.      *
  48.      * @ORM\Column(name="soc_user_mail", type="string", length=80, nullable=false, options={"fixed"=true,"comment"="Е-мейл из соцсети"})
  49.      */
  50.     private $socUserMail;
  51.     /**
  52.      * @var string
  53.      *
  54.      * @ORM\Column(name="display_name", type="string", length=150, nullable=false)
  55.      */
  56.     private $displayName;
  57.     /**
  58.      * @var string
  59.      *
  60.      * @ORM\Column(name="first_name", type="string", length=100, nullable=false)
  61.      */
  62.     private $firstName;
  63.     /**
  64.      * @var string
  65.      *
  66.      * @ORM\Column(name="last_name", type="string", length=100, nullable=false)
  67.      */
  68.     private $lastName;
  69.     /**
  70.      * @var string
  71.      *
  72.      * @ORM\Column(name="profile_url", type="string", length=300, nullable=false)
  73.      */
  74.     private $profileUrl;
  75.     /**
  76.      * @var string
  77.      *
  78.      * @ORM\Column(name="website_url", type="string", length=300, nullable=false)
  79.      */
  80.     private $websiteUrl;
  81.     /**
  82.      * @var string
  83.      *
  84.      * @ORM\Column(name="avatar_url", type="string", length=300, nullable=false)
  85.      */
  86.     private $avatarUrl;
  87.     /**
  88.      * @var \DateTime
  89.      *
  90.      * @ORM\Column(name="date", type="datetime", nullable=false, options={"default"="CURRENT_TIMESTAMP","comment"="дата привязки аккаунта"})
  91.      */
  92.     private $date 'CURRENT_TIMESTAMP';
  93.     public function getId(): ?int
  94.     {
  95.         return $this->id;
  96.     }
  97.     public function getUserId(): ?int
  98.     {
  99.         return $this->userId;
  100.     }
  101.     public function setUserId(int $userId): static
  102.     {
  103.         $this->userId $userId;
  104.         return $this;
  105.     }
  106.     public function getSocial(): ?string
  107.     {
  108.         return $this->social;
  109.     }
  110.     public function setSocial(string $social): static
  111.     {
  112.         $this->social $social;
  113.         return $this;
  114.     }
  115.     public function getAccessToken(): ?string
  116.     {
  117.         return $this->accessToken;
  118.     }
  119.     public function setAccessToken(string $accessToken): static
  120.     {
  121.         $this->accessToken $accessToken;
  122.         return $this;
  123.     }
  124.     public function getSocUserId(): ?string
  125.     {
  126.         return $this->socUserId;
  127.     }
  128.     public function setSocUserId(string $socUserId): static
  129.     {
  130.         $this->socUserId $socUserId;
  131.         return $this;
  132.     }
  133.     public function getSocUserMail(): ?string
  134.     {
  135.         return $this->socUserMail;
  136.     }
  137.     public function setSocUserMail(string $socUserMail): static
  138.     {
  139.         $this->socUserMail $socUserMail;
  140.         return $this;
  141.     }
  142.     public function getDisplayName(): ?string
  143.     {
  144.         return $this->displayName;
  145.     }
  146.     public function setDisplayName(string $displayName): static
  147.     {
  148.         $this->displayName $displayName;
  149.         return $this;
  150.     }
  151.     public function getFirstName(): ?string
  152.     {
  153.         return $this->firstName;
  154.     }
  155.     public function setFirstName(string $firstName): static
  156.     {
  157.         $this->firstName $firstName;
  158.         return $this;
  159.     }
  160.     public function getLastName(): ?string
  161.     {
  162.         return $this->lastName;
  163.     }
  164.     public function setLastName(string $lastName): static
  165.     {
  166.         $this->lastName $lastName;
  167.         return $this;
  168.     }
  169.     public function getProfileUrl(): ?string
  170.     {
  171.         return $this->profileUrl;
  172.     }
  173.     public function setProfileUrl(string $profileUrl): static
  174.     {
  175.         $this->profileUrl $profileUrl;
  176.         return $this;
  177.     }
  178.     public function getWebsiteUrl(): ?string
  179.     {
  180.         return $this->websiteUrl;
  181.     }
  182.     public function setWebsiteUrl(string $websiteUrl): static
  183.     {
  184.         $this->websiteUrl $websiteUrl;
  185.         return $this;
  186.     }
  187.     public function getAvatarUrl(): ?string
  188.     {
  189.         return $this->avatarUrl;
  190.     }
  191.     public function setAvatarUrl(string $avatarUrl): static
  192.     {
  193.         $this->avatarUrl $avatarUrl;
  194.         return $this;
  195.     }
  196.     public function getDate(): ?\DateTimeInterface
  197.     {
  198.         return $this->date;
  199.     }
  200.     public function setDate(\DateTimeInterface $date): static
  201.     {
  202.         $this->date $date;
  203.         return $this;
  204.     }
  205. }