Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Úkol 3 - Vojtěch Havlíček #30

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ahoj codecampe
187 changes: 187 additions & 0 deletions src/AppBundle/Entity/Adress.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
<?php

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
* Adress
*
* @ORM\Table(name="adress")
* @ORM\Entity(repositoryClass="AppBundle\Repository\AdressRepository")
*/
class Adress
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;

/**
* @var string
*
* @ORM\Column(name="street", type="string", length=100)
*/
private $street;

/**
* @var string
*
* @ORM\Column(name="city", type="string", length=100)
*/
private $city;

/**
* @var string
*
* @ORM\Column(name="postcode", type="string", length=30)
*/
private $postcode;

/**
* @var string
*
* @ORM\Column(name="country", type="string", length=100)
*/
private $country;

/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="adresses")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tohle ani není třeba vyplňovat.

*/
private $user;

/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}

/**
* Set street
*
* @param string $street
*
* @return Adress
*/
public function setStreet($street)
{
$this->street = $street;

return $this;
}

/**
* Get street
*
* @return string
*/
public function getStreet()
{
return $this->street;
}

/**
* Set city
*
* @param string $city
*
* @return Adress
*/
public function setCity($city)
{
$this->city = $city;

return $this;
}

/**
* Get city
*
* @return string
*/
public function getCity()
{
return $this->city;
}

/**
* Set postcode
*
* @param string $postcode
*
* @return Adress
*/
public function setPostcode($postcode)
{
$this->postcode = $postcode;

return $this;
}

/**
* Get postcode
*
* @return string
*/
public function getPostcode()
{
return $this->postcode;
}

/**
* Set country
*
* @param string $country
*
* @return Adress
*/
public function setCountry($country)
{
$this->country = $country;

return $this;
}

/**
* Get country
*
* @return string
*/
public function getCountry()
{
return $this->country;
}

/**
* Set user
*
* @param \AppBundle\Entity\User $user
*
* @return Adress
*/
public function setUser(\AppBundle\Entity\User $user = null)
{
$this->user = $user;

return $this;
}

/**
* Get user
*
* @return \AppBundle\Entity\User
*/
public function getUser()
{
return $this->user;
}
}
164 changes: 164 additions & 0 deletions src/AppBundle/Entity/Adress.php~
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
<?php
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hlídej si co commituješ :)


namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
* Adress
*
* @ORM\Table(name="adress")
* @ORM\Entity(repositoryClass="AppBundle\Repository\AdressRepository")
*/
class Adress
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;

/**
* @var string
*
* @ORM\Column(name="street", type="string", length=100)
*/
private $street;

/**
* @var string
*
* @ORM\Column(name="city", type="string", length=100)
*/
private $city;

/**
* @var string
*
* @ORM\Column(name="postcode", type="string", length=30)
*/
private $postcode;

/**
* @var string
*
* @ORM\Column(name="country", type="string", length=100)
*/
private $country;

/**
* @ORM\ManyToOne(targetEntity="User", inversedBy="adresses")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
*/
private $user;

/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}

/**
* Set street
*
* @param string $street
*
* @return Adress
*/
public function setStreet($street)
{
$this->street = $street;

return $this;
}

/**
* Get street
*
* @return string
*/
public function getStreet()
{
return $this->street;
}

/**
* Set city
*
* @param string $city
*
* @return Adress
*/
public function setCity($city)
{
$this->city = $city;

return $this;
}

/**
* Get city
*
* @return string
*/
public function getCity()
{
return $this->city;
}

/**
* Set postcode
*
* @param string $postcode
*
* @return Adress
*/
public function setPostcode($postcode)
{
$this->postcode = $postcode;

return $this;
}

/**
* Get postcode
*
* @return string
*/
public function getPostcode()
{
return $this->postcode;
}

/**
* Set country
*
* @param string $country
*
* @return Adress
*/
public function setCountry($country)
{
$this->country = $country;

return $this;
}

/**
* Get country
*
* @return string
*/
public function getCountry()
{
return $this->country;
}
}

2 changes: 1 addition & 1 deletion src/AppBundle/Entity/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,4 @@ public function isLowestLevel()
return ($this->getRight() - $this->getLeft()) === 1;
}

}
}
Loading