12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- namespace SoftDeleteable\Fixture\Entity;
- use Gedmo\Mapping\Annotation as Gedmo;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * @ORM\Entity
- * @Gedmo\SoftDeleteable(fieldName="deletedAt")
- */
- class Address
- {
- /**
- * @ORM\Column(type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue
- */
- private $id;
- /**
- * @ORM\Column(length=128)
- */
- private $street;
- /**
- * @ORM\Column(type="datetime", nullable=true)
- */
- private $deletedAt;
- /**
- * @ORM\OneToOne(targetEntity="Person", mappedBy="address", cascade={"remove"})
- */
- private $owner;
- public function getId()
- {
- return $this->id;
- }
- public function setStreet($street)
- {
- $this->street = $street;
- return $this;
- }
- public function getStreet()
- {
- return $this->street;
- }
- public function setDeletedAt($deletedAt)
- {
- $this->deletedAt = $deletedAt;
- return $this;
- }
- public function getDeletedAt()
- {
- return $this->deletedAt;
- }
- public function setOwner(Person $owner)
- {
- $this->owner = $owner;
- return $this;
- }
- public function getOwner()
- {
- return $this->owner;
- }
- }
|