Skip to content

Instantly share code, notes, and snippets.

@ajaypatelbardoli
Created October 10, 2014 15:58
Show Gist options
  • Save ajaypatelbardoli/fd02025fd338ed90545e to your computer and use it in GitHub Desktop.
Save ajaypatelbardoli/fd02025fd338ed90545e to your computer and use it in GitHub Desktop.
Profile Entity
<?php
/**
* Created by PhpStorm.
* User: software
* Date: 10/10/14
* Time: 1:10 PM
*/
namespace XXXX\Bundle\UserBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Class User
* @ORM\Entity(repositoryClass="XXXX\Bundle\UserBundle\Entity\ProfileRepository")
* @ORM\Table(name="user_profile")
*/
class Profile {
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(name="first_name", type="string", nullable=false, length=255)
*/
protected $firstName;
/**
* @ORM\Column(name="last_name", type="string", nullable=false, length=255)
*/
protected $lastName;
/**
* @ORM\Column(name="address", type="text", nullable=true)
*/
protected $address;
/**
* @ORM\Column(name="zipcode", type="string", nullable=true, length=15)
*/
protected $zipcode;
/**
* @ORM\Column(name="phone_no_1", type="string", nullable=true, length=15)
*/
protected $phoneNo1;
/**
* @ORM\Column(name="phone_no_2", type="string", nullable=true, length=15)
*/
protected $phoneNo2;
/**
* @ORM\Column(name="telephoneNo", type="string", nullable=true, length=15)
*/
protected $telephoneNo;
/**
* @ORM\Column(name="fax_no", type="string", nullable=true, length=15)
*/
protected $faxNo;
/**
* @ORM\Column(name="website", type="string", nullable=true, length=255)
*/
protected $website;
/**
* @ORM\OneToOne(targetEntity="XXXX\Bundle\UserBundle\Entity\User", inversedBy="profile",cascade={"persist", "merge"})
* @ORM\JoinColumn(name="user_id", referencedColumnName="id")
**/
protected $userId;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set firstName
*
* @param string $firstName
* @return Profile
*/
public function setFirstName($firstName)
{
$this->firstName = $firstName;
return $this;
}
/**
* Get firstName
*
* @return string
*/
public function getFirstName()
{
return $this->firstName;
}
/**
* Set lastName
*
* @param string $lastName
* @return Profile
*/
public function setLastName($lastName)
{
$this->lastName = $lastName;
return $this;
}
/**
* Get lastName
*
* @return string
*/
public function getLastName()
{
return $this->lastName;
}
/**
* Set address
*
* @param string $address
* @return Profile
*/
public function setAddress($address)
{
$this->address = $address;
return $this;
}
/**
* Get address
*
* @return string
*/
public function getAddress()
{
return $this->address;
}
/**
* Set zipcode
*
* @param string $zipcode
* @return Profile
*/
public function setZipcode($zipcode)
{
$this->zipcode = $zipcode;
return $this;
}
/**
* Get zipcode
*
* @return string
*/
public function getZipcode()
{
return $this->zipcode;
}
/**
* Set phoneNo1
*
* @param string $phoneNo1
* @return Profile
*/
public function setPhoneNo1($phoneNo1)
{
$this->phoneNo1 = $phoneNo1;
return $this;
}
/**
* Get phoneNo1
*
* @return string
*/
public function getPhoneNo1()
{
return $this->phoneNo1;
}
/**
* Set phoneNo2
*
* @param string $phoneNo2
* @return Profile
*/
public function setPhoneNo2($phoneNo2)
{
$this->phoneNo2 = $phoneNo2;
return $this;
}
/**
* Get phoneNo2
*
* @return string
*/
public function getPhoneNo2()
{
return $this->phoneNo2;
}
/**
* Set telephoneNo
*
* @param string $telephoneNo
* @return Profile
*/
public function setTelephoneNo($telephoneNo)
{
$this->telephoneNo = $telephoneNo;
return $this;
}
/**
* Get telephoneNo
*
* @return string
*/
public function getTelephoneNo()
{
return $this->telephoneNo;
}
/**
* Set faxNo
*
* @param string $faxNo
* @return Profile
*/
public function setFaxNo($faxNo)
{
$this->faxNo = $faxNo;
return $this;
}
/**
* Get faxNo
*
* @return string
*/
public function getFaxNo()
{
return $this->faxNo;
}
/**
* Set website
*
* @param string $website
* @return Profile
*/
public function setWebsite($website)
{
$this->website = $website;
return $this;
}
/**
* Get website
*
* @return string
*/
public function getWebsite()
{
return $this->website;
}
/**
* Set userId
*
* @param \XXXX\Bundle\UserBundle\Entity\User $userId
* @return Profile
*/
public function setUserId(\XXXX\Bundle\UserBundle\Entity\User $userId = null)
{
$this->userId = $userId;
return $this;
}
/**
* Get userId
*
* @return \XXXX\Bundle\UserBundle\Entity\User
*/
public function getUserId()
{
return $this->userId;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment