src/Entity/RequestAccess.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\RequestAccessRepository")
  6.  */
  7. class RequestAccess
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      * @ORM\GeneratedValue()
  12.      * @ORM\Column(type="integer")
  13.      */
  14.     private $id;
  15.     /**
  16.      * @ORM\Column(type="string", length=255)
  17.      */
  18.     private $customerAccountName;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity="App\Entity\Country", inversedBy="requestAccesses")
  21.      * @ORM\JoinColumn(nullable=false)
  22.      */
  23.     private $country;
  24.     /**
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     private $addressLine1;
  28.     /**
  29.      * @ORM\Column(type="string", length=255, nullable=true)
  30.      */
  31.     private $addressLine2;
  32.     /**
  33.      * @ORM\Column(type="string", length=255, nullable=true)
  34.      */
  35.     private $zipCode;
  36.     /**
  37.      * @ORM\Column(type="string", length=255, nullable=true)
  38.      */
  39.     private $city;
  40.     /**
  41.      * @ORM\ManyToOne(targetEntity="App\Entity\Country")
  42.      * @ORM\JoinColumn(nullable=false)
  43.      */
  44.     private $phoneCountryCode;
  45.     /**
  46.      * @ORM\Column(type="string", length=255)
  47.      */
  48.     private $phone;
  49.     /**
  50.      * @ORM\Column(type="string", length=255, nullable=true)
  51.      */
  52.     private $website;
  53.     /**
  54.      * @ORM\Column(type="string", length=255)
  55.      */
  56.     private $contactFirstName;
  57.     /**
  58.      * @ORM\Column(type="string", length=255)
  59.      */
  60.     private $contactLastName;
  61.     /**
  62.      * @ORM\Column(type="string", length=20, nullable=true)
  63.      */
  64.     private $gender;
  65.     /**
  66.     /**
  67.      * @ORM\Column(type="string", length=255)
  68.      */
  69.     private $email;
  70.     /**
  71.      * @ORM\Column(type="string", length=255, nullable=true)
  72.      */
  73.     private $IATANumber;
  74.     /**
  75.      * @ORM\ManyToOne(targetEntity="App\Entity\Language")
  76.      * @ORM\JoinColumn(nullable=false)
  77.      */
  78.     private $language;
  79.     /**
  80.      * @ORM\ManyToOne(targetEntity="App\Entity\State")
  81.      */
  82.     private $state;
  83. //    /**
  84. //     * @CaptchaAssert\ValidCaptcha(
  85. //     *      message = "CAPTCHA validation failed, try again."
  86. //     * )
  87. //     */
  88. //    protected $captchaCode;
  89.     /**
  90.      * @ORM\ManyToOne(targetEntity="App\Entity\CustomerAccount")
  91.      * @ORM\JoinColumn(nullable=true)
  92.      */
  93.     private $customerAccount;
  94.     /**
  95.      * @ORM\Column(type="string", length=180, nullable=true)
  96.      */
  97.     private $ownershipLink;
  98.     /**
  99.      * @ORM\Column(type="boolean", nullable=true)
  100.      */
  101.     private $isApproved;
  102. //    public function getCaptchaCode()
  103. //    {
  104. //        return $this->captchaCode;
  105. //    }
  106. //
  107. //    public function setCaptchaCode($captchaCode)
  108. //    {
  109. //        $this->captchaCode = $captchaCode;
  110. //    }
  111.     public function getId(): ?int
  112.     {
  113.         return $this->id;
  114.     }
  115.     public function getCustomerAccountName(): ?string
  116.     {
  117.         return $this->customerAccountName;
  118.     }
  119.     public function setCustomerAccountName(string $customerAccountName): self
  120.     {
  121.         $this->customerAccountName $customerAccountName;
  122.         return $this;
  123.     }
  124.     public function getCountry(): ?Country
  125.     {
  126.         return $this->country;
  127.     }
  128.     public function setCountry(?Country $country): self
  129.     {
  130.         $this->country $country;
  131.         return $this;
  132.     }
  133.     public function getAddressLine1(): ?string
  134.     {
  135.         return $this->addressLine1;
  136.     }
  137.     public function setAddressLine1(string $addressLine1): self
  138.     {
  139.         $this->addressLine1 $addressLine1;
  140.         return $this;
  141.     }
  142.     public function getAddressLine2(): ?string
  143.     {
  144.         return $this->addressLine2;
  145.     }
  146.     public function setAddressLine2(?string $addressLine2): self
  147.     {
  148.         $this->addressLine2 $addressLine2;
  149.         return $this;
  150.     }
  151.     public function getZipCode(): ?string
  152.     {
  153.         return $this->zipCode;
  154.     }
  155.     public function setZipCode(?string $zipCode): self
  156.     {
  157.         $this->zipCode $zipCode;
  158.         return $this;
  159.     }
  160.     public function getCity(): ?string
  161.     {
  162.         return $this->city;
  163.     }
  164.     public function setCity(?string $city): self
  165.     {
  166.         $this->city $city;
  167.         return $this;
  168.     }
  169.     public function getPhoneCountryCode(): ?Country
  170.     {
  171.         return $this->phoneCountryCode;
  172.     }
  173.     public function setPhoneCountryCode(?Country $phoneCountryCode): self
  174.     {
  175.         $this->phoneCountryCode $phoneCountryCode;
  176.         return $this;
  177.     }
  178.     public function getPhone(): ?string
  179.     {
  180.         return $this->phone;
  181.     }
  182.     public function setPhone(string $phone): self
  183.     {
  184.         $this->phone $phone;
  185.         return $this;
  186.     }
  187.     public function getWebsite(): ?string
  188.     {
  189.         return $this->website;
  190.     }
  191.     public function setWebsite(?string $website): self
  192.     {
  193.         $this->website $website;
  194.         return $this;
  195.     }
  196.     public function getContactFirstName(): ?string
  197.     {
  198.         return $this->contactFirstName;
  199.     }
  200.     public function setContactFirstName(string $contactFirstName): self
  201.     {
  202.         $this->contactFirstName $contactFirstName;
  203.         return $this;
  204.     }
  205.     public function getContactLastName(): ?string
  206.     {
  207.         return $this->contactLastName;
  208.     }
  209.     public function setContactLastName($contactLastName):self
  210.     {
  211.         $this->contactLastName $contactLastName;
  212.         return $this;
  213.     }
  214.     public function getGender():? string
  215.     {
  216.         return $this->gender;
  217.     }
  218.     public function setGender($gender):self
  219.     {
  220.         $this->gender $gender;
  221.         return $this;
  222.     }
  223.     public function getEmail(): ?string
  224.     {
  225.         return $this->email;
  226.     }
  227.     public function setEmail(string $email): self
  228.     {
  229.         $this->email $email;
  230.         return $this;
  231.     }
  232.     public function getIATANumber():?string
  233.     {
  234.         return $this->IATANumber;
  235.     }
  236.     public function setIATANumber($IATANumber): self
  237.     {
  238.         $this->IATANumber $IATANumber;
  239.         return $this;
  240.     }
  241.     
  242.     public function getLanguage(): ?Language
  243.     {
  244.         return $this->language;
  245.     }
  246.     public function setLanguage(?Language $language): self
  247.     {
  248.         $this->language $language;
  249.         return $this;
  250.     }
  251.     public function getState(): ?State
  252.     {
  253.         return $this->state;
  254.     }
  255.     public function setState(?State $state): self
  256.     {
  257.         $this->state $state;
  258.         return $this;
  259.     }
  260.     /**
  261.      * @return mixed
  262.      */
  263.     public function getCustomerAccount()
  264.     {
  265.         return $this->customerAccount;
  266.     }
  267.     /**
  268.      * @param mixed $customerAccount
  269.      */
  270.     public function setCustomerAccount($customerAccount): void
  271.     {
  272.         $this->customerAccount $customerAccount;
  273.     }
  274.     /**
  275.      * @return mixed
  276.      */
  277.     public function getOwnershipLink()
  278.     {
  279.         return $this->ownershipLink;
  280.     }
  281.     /**
  282.      * @param mixed $ownershipLink
  283.      */
  284.     public function setOwnershipLink($ownershipLink): void
  285.     {
  286.         $this->ownershipLink $ownershipLink;
  287.     }
  288.     /**
  289.      * @return mixed
  290.      */
  291.     public function getIsApproved()
  292.     {
  293.         return $this->isApproved;
  294.     }
  295.     /**
  296.      * @param mixed $isApproved
  297.      */
  298.     public function setIsApproved($isApproved): void
  299.     {
  300.         $this->isApproved $isApproved;
  301.     }
  302.     /**
  303.      * @return string
  304.      */
  305.     public function getStatus()
  306.     {
  307.         $status="Pending";
  308.         if($this->isApproved){
  309.             return "Approved";
  310.         }
  311.         if($this->isApproved===false){
  312.             return "Refused";
  313.         }
  314.         return $status;
  315.     }
  316. }