CompanyEvent.php 869B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Doctrine\Tests\Models\Company;
  3. /**
  4. * @Entity @Table(name="company_events")
  5. * @InheritanceType("JOINED")
  6. * @DiscriminatorColumn(name="event_type", type="string")
  7. * @DiscriminatorMap({"auction"="CompanyAuction", "raffle"="CompanyRaffle"})
  8. */
  9. abstract class CompanyEvent {
  10. /**
  11. * @Id @Column(type="integer")
  12. * @GeneratedValue
  13. */
  14. private $id;
  15. /**
  16. * @ManyToOne(targetEntity="CompanyOrganization", inversedBy="events", cascade={"persist"})
  17. * @JoinColumn(name="org_id", referencedColumnName="id")
  18. */
  19. private $organization;
  20. public function getId() {
  21. return $this->id;
  22. }
  23. public function getOrganization() {
  24. return $this->organization;
  25. }
  26. public function setOrganization(CompanyOrganization $org) {
  27. $this->organization = $org;
  28. }
  29. }