src/Admin/Modules/User/Entity/UserAdmin.php line 13

  1. <?php
  2. namespace App\Admin\Modules\User\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use App\Modules\User\Entity\User;
  6. /**
  7.  * @ORM\Table(name="user_admin", uniqueConstraints={@ORM\UniqueConstraint(name="id_user", columns={"id_user"}), @ORM\UniqueConstraint(columns={"company_name"}), @ORM\UniqueConstraint(columns={"alias"})})
  8.  * @ORM\Entity
  9.  */
  10. class UserAdmin
  11. {
  12.     const ACTIVE_MODULE_TICKETS 1;
  13.     const ACTIVE_MODULE_CONTRACTS 2;
  14.     const ACTIVE_MODULE_MEETING_SCHEDULER 3;
  15.     const ACTIVE_MODULE_STORE 4;
  16.     
  17.     /**
  18.      * @ORM\Column(type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @var \App\Modules\User\Entity\User
  25.      *
  26.      * @ORM\ManyToOne(targetEntity="App\Modules\User\Entity\User", inversedBy="admin")
  27.      * @ORM\JoinColumns({
  28.      *   @ORM\JoinColumn(name="id_user", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  29.      * })
  30.      */
  31.     private $user;
  32.     
  33.     /**
  34.      * @var string
  35.      *
  36.      * @ORM\Column(name="company_name", type="string", length=255, nullable=false, options={"collation"="utf8_unicode_ci"})
  37.      */
  38.     private $companyName;
  39.     
  40.     /**
  41.      * @var string
  42.      *
  43.      * @ORM\Column(name="alias", type="string", length=255, nullable=false)
  44.      */
  45.     private $alias;    
  46.     /**
  47.      * @var string
  48.      *
  49.      * @ORM\Column(name="tin", type="string", length=25, nullable=true)
  50.      */
  51.     private $tin;
  52.     /**
  53.      * @var string
  54.      *
  55.      * @ORM\Column(name="phone", type="string", length=25, nullable=true)
  56.      */
  57.     private $phone;
  58.     
  59.     /**
  60.      * @ORM\Column(name="logo", type="string", length=255, nullable=true)
  61.      */
  62.     private $logo;    
  63.     /**
  64.      * @ORM\Column(name="active_modules", type="string", length=255, nullable=true)
  65.      */
  66.     private $activeModules;
  67.     /**
  68.      * @var int
  69.      *
  70.      * @ORM\Column(name="max_partner_count", type="integer", nullable=false, options={"unsigned"=true})
  71.      */
  72.     private $maxPartnerCount;
  73.     /**
  74.      * @var int
  75.      *
  76.      * @ORM\Column(name="available_voucher_count", type="integer", nullable=false, options={"unsigned"=true})
  77.      */
  78.     private $availableVoucherCount;
  79.     public function __construct()
  80.     {
  81.         $this->maxPartnerCount 0;
  82.         $this->availableVoucherCount 0;
  83.     }
  84.     
  85.     public function getId(): ?int
  86.     {
  87.         return $this->id;
  88.     }
  89.     public function getUser(): ?User
  90.     {
  91.         return $this->user;
  92.     }
  93.     public function setUser(?User $user): self
  94.     {
  95.         $this->user $user;
  96.         return $this;
  97.     }
  98.     public function getMaxPartnerCount(): ?int
  99.     {
  100.         return $this->maxPartnerCount;
  101.     }
  102.     public function setMaxPartnerCount(int $maxPartnerCount): self
  103.     {
  104.         $this->maxPartnerCount $maxPartnerCount;
  105.         return $this;
  106.     }
  107.     public function getAvailableVoucherCount(): ?int
  108.     {
  109.         return $this->availableVoucherCount;
  110.     }
  111.     public function setAvailableVoucherCount(int $availableVoucherCount): self
  112.     {
  113.         $this->availableVoucherCount $availableVoucherCount;
  114.         return $this;
  115.     }
  116.     public function getPhone(): ?string
  117.     {
  118.         return $this->phone;
  119.     }
  120.     public function setPhone(?string $phone): self
  121.     {
  122.         $this->phone $phone;
  123.         return $this;
  124.     }
  125.     public function getCompanyName(): ?string
  126.     {
  127.         return $this->companyName;
  128.     }
  129.     public function setCompanyName(string $companyName): self
  130.     {
  131.         $this->companyName $companyName;
  132.         return $this;
  133.     }
  134.     public function getAlias(): ?string
  135.     {
  136.         return $this->alias;
  137.     }
  138.     public function setAlias(string $alias): self
  139.     {
  140.         $this->alias $alias;
  141.         return $this;
  142.     }
  143.     public function getLogo(): ?string
  144.     {
  145.         return $this->logo;
  146.     }
  147.     public function setLogo(?string $logo): self
  148.     {
  149.         $this->logo $logo;
  150.         return $this;
  151.     }
  152.     public function getTin(): ?string
  153.     {
  154.         return $this->tin;
  155.     }
  156.     public function setTin(?string $tin): self
  157.     {
  158.         $this->tin $tin;
  159.         return $this;
  160.     }
  161.     public function getActiveModules(): ?string
  162.     {
  163.         return $this->activeModules;
  164.     }
  165.     public function setActiveModules(?string $activeModules): self
  166.     {
  167.         $this->activeModules $activeModules;
  168.         return $this;
  169.     }
  170. }