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