Skip to content

Commit

Permalink
[5-1] Inquiryエンティティクラスの生成、生成されたInquiryクラス
Browse files Browse the repository at this point in the history
  • Loading branch information
hidenorigoto committed Nov 4, 2015
1 parent 3a92c87 commit b981326
Show file tree
Hide file tree
Showing 3 changed files with 263 additions and 0 deletions.
60 changes: 60 additions & 0 deletions docs/lists/ch05/05-01.txt
@@ -0,0 +1,60 @@
<?php

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

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

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

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

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

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

/**
* @var string
*
* @ORM\Column(name="content", type="text")
*/
private $content;

...
}
190 changes: 190 additions & 0 deletions src/AppBundle/Entity/Inquiry.php
@@ -0,0 +1,190 @@
<?php

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

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

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

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

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

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

/**
* @var string
*
* @ORM\Column(name="content", type="text")
*/
private $content;


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

/**
* Set name
*
* @param string $name
*
* @return Inquiry
*/
public function setName($name)
{
$this->name = $name;

return $this;
}

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

/**
* Set email
*
* @param string $email
*
* @return Inquiry
*/
public function setEmail($email)
{
$this->email = $email;

return $this;
}

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

/**
* Set tel
*
* @param string $tel
*
* @return Inquiry
*/
public function setTel($tel)
{
$this->tel = $tel;

return $this;
}

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

/**
* Set type
*
* @param string $type
*
* @return Inquiry
*/
public function setType($type)
{
$this->type = $type;

return $this;
}

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

/**
* Set content
*
* @param string $content
*
* @return Inquiry
*/
public function setContent($content)
{
$this->content = $content;

return $this;
}

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

13 changes: 13 additions & 0 deletions src/AppBundle/Entity/InquiryRepository.php
@@ -0,0 +1,13 @@
<?php

namespace AppBundle\Entity;

/**
* InquiryRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class InquiryRepository extends \Doctrine\ORM\EntityRepository
{
}

0 comments on commit b981326

Please sign in to comment.