<?php

namespace App\Entity;

use App\Repository\UserRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;

/**
 * @ORM\Entity(repositoryClass=UserRepository::class)
 */
class User implements UserInterface
{
    /**
     * @ORM\Id()
     * @ORM\GeneratedValue()
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @ORM\Column(type="string", length=180, unique=true)
     */
    private $username;

    /**
     * @ORM\Column(type="string")
     */
    private $roles;

    /**
     * @var string The hashed password
     * @ORM\Column(type="string")
     */
    private $password;
    
    /**
     * @ORM\Column(type="string", length=180, unique=true)
     */
    private $email;

    /**
     * @ORM\Column(type="string", length=180,nullable=true)
     */
    private $company;
    /**
     * @ORM\Column(type="string", length=180,nullable=true)
     */
    private $licenceNumber;
    /**
     * @ORM\Column(type="string", length=180,nullable=true)
     */
    private $firstOwnerName;
    /**
     * @ORM\Column(type="string", length=180,nullable=true)
     */
    private $photoowner;
     /**
     * @ORM\Column(type="string", length=180,nullable=true)
     */
    private $otherOwnerName;
     /**
     * @ORM\Column(type="integer",nullable=true)
     */
    private $phoneNumber;
    /**
     * @ORM\Column(type="integer",nullable=true)
     */
    private $officeNumber;
     /**
     * @ORM\Column(type="string", length=180,nullable=true)
     */
    private $city;
     /**
     * @ORM\Column(type="string", length=180,nullable=true)
     */
    private $province;
    /**
     * @ORM\Column(type="string", length=180,nullable=true)
     */
    private $zipcode;
    /**
     * @ORM\Column(type="string", length=180,nullable=true)
     */
    private $fullAdress;
    /**
     * @ORM\Column(type="string", length=180,nullable=true)
     */
    private $tokenPassword;
    /**
     * @ORM\Column(type="boolean",options={"default":0})
     */
    private $isactive;
    

    public function __construct()
    {

        $this->isactive=0;
    }




    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * A visual identifier that represents this user.
     *
     * @see UserInterface
     */
    public function getUsername(): string
    {
        return (string) $this->username;
    }

    public function setUsername(string $username): self
    {
        $this->username = $username;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * @param mixed $email
     */
    public function setEmail($email): void
    {
        $this->email = $email;
    }

    /**
     * @see UserInterface
     */
    public function getRoles()
    {
        $roles = $this->roles;

        return array_unique(json_decode($roles));
    }

    public function setRoles($roles): self
    {
        $this->roles = $roles;

        return $this;
    }

    /**
     * @see UserInterface
     */
    public function getPassword(): string
    {
        return (string) $this->password;
    }

    public function setPassword(string $password): self
    {
        $this->password = $password;

        return $this;
    }
   

    /**
     * @see UserInterface
     */
    public function getSalt()
    {
        // not needed when using the "bcrypt" algorithm in security.yaml
    }

    /**
     * @see UserInterface
     */
    public function eraseCredentials()
    {
        // If you store any temporary, sensitive data on the user, clear it here
        // $this->plainPassword = null;
    }

    /**
     * @return mixed
     */
    public function getCompany()
    {
        return $this->company;
    }

    /**
     * @param mixed $company
     */
    public function setCompany($company): void
    {
        $this->company = $company;
    }
     /**
     * @return mixed
     */
    public function getLicenceNumber()
    {
        return $this->licenceNumber;
    }

    /**
     * @param mixed $licenceNumber
     */
    public function setLicenceNumber($licenceNumber): void
    {
        $this->licenceNumber = $licenceNumber;
    }
    

     /**
     * @return mixed
     */
    public function getFirstOwnerName()
    {
        return $this->firstOwnerName;
    }

    /**
     * @param mixed $firstOwnerName
     */
    public function setFirstOwnerName($firstOwnerName): void
    {
        $this->firstOwnerName = $firstOwnerName;
    }
    
     /**
     * @return mixed
     */
    public function getOtherOwnerName()
    {
        return $this->otherOwnerName;
    }

    /**
     * @param mixed $otherOwnerName
     */
    public function setOtherOwnerName($otherOwnerName): void
    {
        $this->otherOwnerName = $otherOwnerName;
    }
    
    /**
     * @return mixed
     */
    public function getPhoneNumber()
    {
        return $this->phoneNumber;
    }

    /**
     * @param mixed $phoneNumber
     */
    public function setPhoneNumber($phoneNumber): void
    {
        $this->phoneNumber = $phoneNumber;
    }
    
     /**
     * @return mixed
     */
    public function getCity()
    {
        return $this->city;
    }

    /**
     * @param mixed $city
     */
    public function setCity($city): void
    {
        $this->city = $city;
    }
    
     /**
     * @return mixed
     */
    public function getProvince()
    {
        return $this->province;
    }

    /**
     * @param mixed $province
     */
    public function setProvince($province): void
    {
        $this->province = $province;
    }
    
     /**
     * @return mixed
     */
    public function getZipcode()
    {
        return $this->zipcode;
    }

    /**
     * @param mixed $zipcode
     */
    public function setZipcode($zipcode): void
    {
        $this->zipcode = $zipcode;
    }
    
     /**
     * @return mixed
     */
    public function getFullAdress()
    {
        return $this->fullAdress;
    }

    /**
     * @param mixed $fullAdress
     */
    public function setFullAdress($fullAdress): void
    {
        $this->fullAdress = $fullAdress;
    }
    
     /**
     * @return mixed
     */
    public function getOfficeNumber()
    {
        return $this->officeNumber;
    }

    /**
     * @param mixed $officeNumber
     */
    public function setOfficeNumber($officeNumber): void
    {
        $this->officeNumber = $officeNumber;
    }

    /**
     * @return mixed
     */
    public function getTokenPassword()
    {
        return $this->tokenPassword;
    }

    /**
     * @param mixed $tokenPassword
     */
    public function setTokenPassword($tokenPassword): void
    {
        $this->tokenPassword = $tokenPassword;
    }

    /**
     * @return mixed
     */
    public function getPhotoowner()
    {
        return $this->photoowner;
    }

    /**
     * @param mixed $photoowner
     */
    public function setPhotoowner($photoowner): void
    {
        $this->photoowner = $photoowner;
    }

    /**
     * @return mixed
     */
    public function getIsactive()
    {
        return $this->isactive;
    }

    /**
     * @param mixed $isactive
     */
    public function setIsactive($isactive): void
    {
        $this->isactive = $isactive;
    }
   
   
   




}

