src/Entity/User.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping\Index;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\Repository\UserRepository;
  7. use Symfony\Component\Security\Core\User\UserInterface;
  8. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  9. #[ORM\Entity(repositoryClassUserRepository::class)]
  10. #[Index(name"user_type"columns: ["type"])]
  11. #[Index(name"user_visible"columns: ["visible"])]
  12. #[Index(name"user_status"columns: ["status"])]
  13. class User implements UserInterfacePasswordAuthenticatedUserInterfaceEntityInterface
  14. {
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column]
  18.     private ?int $id null;
  19.     #[ORM\Column(length180)]
  20.     private ?string $email null;
  21.     #[ORM\Column]
  22.     private array $roles = ["ROLE_USER"];
  23.     /**
  24.      * @var string The hashed password
  25.      */
  26.     #[ORM\Column]
  27.     private ?string $password '';
  28.     #[ORM\Column(length255)]
  29.     private ?string $google_id '';
  30.     #[ORM\Column(length255)]
  31.     private ?string $facebook_id '';
  32.     #[ORM\Column]
  33.     private ?int $manager 0;
  34.     #[ORM\Column]
  35.     private ?int $referal 0;
  36.     #[ORM\Column(length255)]
  37.     private ?string $type '';
  38.     #[ORM\Column(length255)]
  39.     private ?string $name '';
  40.     #[ORM\Column(length255)]
  41.     private ?string $surname '';
  42.     #[ORM\Column(length1)]
  43.     private ?string $gender '';
  44.     #[ORM\Column(length255)]
  45.     private ?string $country '';
  46.     #[ORM\Column(length255)]
  47.     private ?string $city '';
  48.     #[ORM\Column(length255)]
  49.     private ?string $address '';
  50.     #[ORM\Column(length255)]
  51.     private ?string $lat '';
  52.     #[ORM\Column(length255)]
  53.     private ?string $lon '';
  54.     #[ORM\Column(length255)]
  55.     private ?string $phone '';
  56.     #[ORM\Column]
  57.     private ?int $discount 0;
  58.     #[ORM\Column]
  59.     private ?bool $visible true;
  60.     #[ORM\Column(typeTypes::SMALLINT)]
  61.     private ?int $status 0;
  62.     #[ORM\Column]
  63.     private ?int $birth 0;
  64.     #[ORM\Column(length255)]
  65.     private ?string $ip '0.0.0.0';
  66.     #[ORM\Column]
  67.     private ?int $lastlogon 0;
  68.     #[ORM\Column]
  69.     private ?int $logons 0;
  70.     #[ORM\Column]
  71.     private ?int $created 0;
  72.     #[ORM\Column(length255)]
  73.     private ?string $color '';
  74.     #[ORM\Column]
  75.     private ?bool $opt false;
  76.     #[ORM\Column]
  77.     private ?bool $miniopt false;
  78.     #[ORM\Column]
  79.     private ?bool $ads false;
  80.     #[ORM\Column]
  81.     private ?int $lastordertime 0;
  82.     #[ORM\Column]
  83.     private ?float $ordersum 0;
  84.     #[ORM\Column]
  85.     private ?int $ordernum 0;
  86.     #[ORM\Column(length255)]
  87.     private ?string $external_id '';
  88.     #[ORM\Column(length255)]
  89.     private ?string $company_nip '';
  90.     #[ORM\Column(length255)]
  91.     private ?string $company_name '';
  92.     #[ORM\Column(length255)]
  93.     private ?string $company_index '';
  94.     #[ORM\Column(length255)]
  95.     private ?string $company_city '';
  96.     #[ORM\Column(length255)]
  97.     private ?string $company_street '';
  98.     #[ORM\Column(length255)]
  99.     private ?string $company_house '';
  100.     #[ORM\Column(length255)]
  101.     private ?string $company_flat '';
  102.     public function getId(): ?int
  103.     {
  104.         return $this->id;
  105.     }
  106.     public function getEmail(): ?string
  107.     {
  108.         return $this->email;
  109.     }
  110.     public function setEmail(string $email): self
  111.     {
  112.         $this->email $email;
  113.         return $this;
  114.     }
  115.     /**
  116.      * A visual identifier that represents this user.
  117.      *
  118.      * @see UserInterface
  119.      */
  120.     public function getUserIdentifier(): string
  121.     {
  122.         return (string) $this->email;
  123.     }
  124.     /**
  125.      * @see UserInterface
  126.      */
  127.     public function getRoles(): array
  128.     {
  129.         $roles $this->roles;
  130.         // guarantee every user at least has ROLE_USER
  131.         $roles[] = 'ROLE_USER';
  132.         return array_unique($roles);
  133.     }
  134.     public function setRoles(array $roles): self
  135.     {
  136.         $this->roles $roles;
  137.         return $this;
  138.     }
  139.     /**
  140.      * @see PasswordAuthenticatedUserInterface
  141.      */
  142.     public function getPassword(): string
  143.     {
  144.         return $this->password;
  145.     }
  146.     public function setPassword(string $password): self
  147.     {
  148.         $this->password $password;
  149.         return $this;
  150.     }
  151.     /**
  152.      * @see UserInterface
  153.      */
  154.     public function eraseCredentials()
  155.     {
  156.         // If you store any temporary, sensitive data on the user, clear it here
  157.         // $this->plainPassword = null;
  158.     }
  159.     public function getGoogleId(): ?string
  160.     {
  161.         return $this->google_id;
  162.     }
  163.     public function setGoogleId(string $google_id): self
  164.     {
  165.         $this->google_id $google_id;
  166.         return $this;
  167.     }
  168.     public function getFacebookId(): ?string
  169.     {
  170.         return $this->facebook_id;
  171.     }
  172.     public function setFacebookId(string $facebook_id): self
  173.     {
  174.         $this->facebook_id $facebook_id;
  175.         return $this;
  176.     }
  177.     public function getManager(): ?int
  178.     {
  179.         return $this->manager;
  180.     }
  181.     public function setManager(int $manager): self
  182.     {
  183.         $this->manager $manager;
  184.         return $this;
  185.     }
  186.     public function getReferal(): ?int
  187.     {
  188.         return $this->referal;
  189.     }
  190.     public function setReferal(int $referal): self
  191.     {
  192.         $this->referal $referal;
  193.         return $this;
  194.     }
  195.     public function getType(): ?string
  196.     {
  197.         return $this->type;
  198.     }
  199.     public function setType(string $type): self
  200.     {
  201.         $this->type $type;
  202.         return $this;
  203.     }
  204.     public function getName(): ?string
  205.     {
  206.         return $this->name;
  207.     }
  208.     public function setName(string $name): self
  209.     {
  210.         $this->name $name;
  211.         return $this;
  212.     }
  213.     public function getSurname(): ?string
  214.     {
  215.         return $this->surname;
  216.     }
  217.     public function setSurname(string $surname): self
  218.     {
  219.         $this->surname $surname;
  220.         return $this;
  221.     }
  222.     public function getGender(): ?string
  223.     {
  224.         return $this->gender;
  225.     }
  226.     public function setGender(string $gender): self
  227.     {
  228.         $this->gender $gender;
  229.         return $this;
  230.     }
  231.     public function getCountry(): ?string
  232.     {
  233.         return $this->country;
  234.     }
  235.     public function setCountry(string $country): self
  236.     {
  237.         $this->country $country;
  238.         return $this;
  239.     }
  240.     public function getCity(): ?string
  241.     {
  242.         return $this->city;
  243.     }
  244.     public function setCity(string $city): self
  245.     {
  246.         $this->city $city;
  247.         return $this;
  248.     }
  249.     public function getAddress(): ?string
  250.     {
  251.         return $this->address;
  252.     }
  253.     public function setAddress(string $address): self
  254.     {
  255.         $this->address $address;
  256.         return $this;
  257.     }
  258.     public function getLat(): ?string
  259.     {
  260.         return $this->lat;
  261.     }
  262.     public function setLat(string $lat): self
  263.     {
  264.         $this->lat $lat;
  265.         return $this;
  266.     }
  267.     public function getLon(): ?string
  268.     {
  269.         return $this->lon;
  270.     }
  271.     public function setLon(string $lon): self
  272.     {
  273.         $this->lon $lon;
  274.         return $this;
  275.     }
  276.     public function getPhone(): ?string
  277.     {
  278.         return $this->phone;
  279.     }
  280.     public function setPhone(string $phone): self
  281.     {
  282.         $this->phone $phone;
  283.         return $this;
  284.     }
  285.     public function getDiscount(): ?int
  286.     {
  287.         return $this->discount;
  288.     }
  289.     public function setDiscount(int $discount): self
  290.     {
  291.         $this->discount $discount;
  292.         return $this;
  293.     }
  294.     public function isVisible(): ?bool
  295.     {
  296.         return $this->visible;
  297.     }
  298.     public function setVisible(bool $visible): self
  299.     {
  300.         $this->visible $visible;
  301.         return $this;
  302.     }
  303.     public function getStatus(): ?int
  304.     {
  305.         return $this->status;
  306.     }
  307.     public function setStatus(int $status): self
  308.     {
  309.         $this->status $status;
  310.         return $this;
  311.     }
  312.     public function getBirth(): ?int
  313.     {
  314.         return $this->birth;
  315.     }
  316.     public function setBirth(int $birth): self
  317.     {
  318.         $this->birth $birth;
  319.         return $this;
  320.     }
  321.     public function getIp(): ?string
  322.     {
  323.         return $this->ip;
  324.     }
  325.     public function setIp(string $ip): self
  326.     {
  327.         $this->ip $ip;
  328.         return $this;
  329.     }
  330.     public function getLastlogon(): ?int
  331.     {
  332.         return $this->lastlogon;
  333.     }
  334.     public function setLastlogon(int $lastlogon): self
  335.     {
  336.         $this->lastlogon $lastlogon;
  337.         return $this;
  338.     }
  339.     public function getLogons(): ?string
  340.     {
  341.         return $this->logons;
  342.     }
  343.     public function setLogons(string $logons): self
  344.     {
  345.         $this->logons $logons;
  346.         return $this;
  347.     }
  348.     public function getCreated(): ?int
  349.     {
  350.         return $this->created;
  351.     }
  352.     public function setCreated(int $created): self
  353.     {
  354.         $this->created $created;
  355.         return $this;
  356.     }
  357.     public function getColor(): ?string
  358.     {
  359.         return $this->color;
  360.     }
  361.     public function setColor(string $color): self
  362.     {
  363.         $this->color $color;
  364.         return $this;
  365.     }
  366.     public function isOpt(): ?bool
  367.     {
  368.         return $this->opt;
  369.     }
  370.     public function setOpt(bool $opt): self
  371.     {
  372.         $this->opt $opt;
  373.         return $this;
  374.     }
  375.     public function isMiniopt(): ?bool
  376.     {
  377.         return $this->miniopt;
  378.     }
  379.     public function setMiniopt(bool $miniopt): self
  380.     {
  381.         $this->miniopt $miniopt;
  382.         return $this;
  383.     }
  384.     public function isAds(): ?bool
  385.     {
  386.         return $this->ads;
  387.     }
  388.     public function setAds(bool $ads): self
  389.     {
  390.         $this->ads $ads;
  391.         return $this;
  392.     }
  393.     public function getLastordertime(): ?int
  394.     {
  395.         return $this->lastordertime;
  396.     }
  397.     public function setLastordertime(int $lastordertime): self
  398.     {
  399.         $this->lastordertime $lastordertime;
  400.         return $this;
  401.     }
  402.     public function getOrdernum(): ?float
  403.     {
  404.         return $this->ordernum;
  405.     }
  406.     public function setOrdernum(float $ordernum): self
  407.     {
  408.         $this->ordernum $ordernum;
  409.         return $this;
  410.     }
  411.     public function getOrdersum(): ?float
  412.     {
  413.         return $this->ordersum;
  414.     }
  415.     public function setOrdersum(float $ordersum): self
  416.     {
  417.         $this->ordersum $ordersum;
  418.         return $this;
  419.     }
  420.     public function getExternalId(): ?string
  421.     {
  422.         return $this->external_id;
  423.     }
  424.     public function setExternalId(string $external_id): self
  425.     {
  426.         $this->external_id $external_id;
  427.         return $this;
  428.     }
  429.     /**
  430.      * Get the value of company_nip
  431.      */ 
  432.     public function getCompanyNip()
  433.     {
  434.         return $this->company_nip;
  435.     }
  436.     /**
  437.      * Set the value of company_nip
  438.      *
  439.      * @return  self
  440.      */ 
  441.     public function setCompanyNip($company_nip)
  442.     {
  443.         $this->company_nip $company_nip;
  444.         return $this;
  445.     }
  446.     /**
  447.      * Get the value of company_name
  448.      */ 
  449.     public function getCompanyName()
  450.     {
  451.         return $this->company_name;
  452.     }
  453.     /**
  454.      * Set the value of company_name
  455.      *
  456.      * @return  self
  457.      */ 
  458.     public function setCompanyName($company_name)
  459.     {
  460.         $this->company_name $company_name;
  461.         return $this;
  462.     }
  463.     /**
  464.      * Get the value of company_index
  465.      */ 
  466.     public function getCompanyIndex()
  467.     {
  468.         return $this->company_index;
  469.     }
  470.     /**
  471.      * Set the value of company_index
  472.      *
  473.      * @return  self
  474.      */ 
  475.     public function setCompanyIndex($company_index)
  476.     {
  477.         $this->company_index $company_index;
  478.         return $this;
  479.     }
  480.     /**
  481.      * Get the value of company_city
  482.      */ 
  483.     public function getCompanyCity()
  484.     {
  485.         return $this->company_city;
  486.     }
  487.     /**
  488.      * Set the value of company_city
  489.      *
  490.      * @return  self
  491.      */ 
  492.     public function setCompanyCity($company_city)
  493.     {
  494.         $this->company_city $company_city;
  495.         return $this;
  496.     }
  497.     /**
  498.      * Get the value of company_street
  499.      */ 
  500.     public function getCompanyStreet()
  501.     {
  502.         return $this->company_street;
  503.     }
  504.     /**
  505.      * Set the value of company_street
  506.      *
  507.      * @return  self
  508.      */ 
  509.     public function setCompanyStreet($company_street)
  510.     {
  511.         $this->company_street $company_street;
  512.         return $this;
  513.     }
  514.     /**
  515.      * Get the value of company_house
  516.      */ 
  517.     public function getCompanyHouse()
  518.     {
  519.         return $this->company_house;
  520.     }
  521.     /**
  522.      * Set the value of company_house
  523.      *
  524.      * @return  self
  525.      */ 
  526.     public function setCompanyHouse($company_house)
  527.     {
  528.         $this->company_house $company_house;
  529.         return $this;
  530.     }
  531.     /**
  532.      * Get the value of company_flat
  533.      */ 
  534.     public function getCompanyFlat()
  535.     {
  536.         return $this->company_flat;
  537.     }
  538.     /**
  539.      * Set the value of company_flat
  540.      *
  541.      * @return  self
  542.      */ 
  543.     public function setCompanyFlat($company_flat)
  544.     {
  545.         $this->company_flat $company_flat;
  546.         return $this;
  547.     }
  548. }