97cc49033e
| Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Used short syntax for ```integer``` and ```boolean``` types. **Before** ```php /** * @var integer * * @ORM\Column(name="some_integer_field", type="integer") */ private $someIntegerField; /** * @var boolean * * @ORM\Column(name="some_boolean_field", type="boolean") */ private $someBooleanField; ``` **After** ```php /** * @var int * * @ORM\Column(name="some_integer_field", type="integer") */ private $someIntegerField; /** * @var bool * * @ORM\Column(name="some_boolean_field", type="boolean") */ private $someBooleanField; ```
57 lines
823 B
PHP
57 lines
823 B
PHP
<?php
|
|
|
|
namespace Doctrine\Tests\Models\DDC1590;
|
|
|
|
/**
|
|
* @Entity
|
|
* @MappedSuperClass
|
|
*/
|
|
abstract class DDC1590Entity
|
|
{
|
|
/**
|
|
* @Id
|
|
* @Column(type="integer")
|
|
* @GeneratedValue(strategy="AUTO")
|
|
*/
|
|
protected $id;
|
|
|
|
/**
|
|
* @Column(type="datetime")
|
|
*/
|
|
protected $created_at;
|
|
|
|
/**
|
|
* Get id
|
|
*
|
|
* @return int
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* Set createdAt
|
|
*
|
|
* @param \DateTime $createdAt
|
|
*
|
|
* @return DDC1590User
|
|
*/
|
|
public function setCreatedAt($createdAt)
|
|
{
|
|
$this->created_at = $createdAt;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get createdAt
|
|
*
|
|
* @return \DateTime
|
|
*/
|
|
public function getCreatedAt()
|
|
{
|
|
return $this->created_at;
|
|
}
|
|
}
|