2009-09-15 16:24:38 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Doctrine\Tests\Models\Company;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Entity @Table(name="company_events")
|
|
|
|
* @InheritanceType("JOINED")
|
|
|
|
* @DiscriminatorColumn(name="event_type", type="string")
|
2010-04-15 20:36:17 +04:00
|
|
|
* @DiscriminatorMap({"auction"="CompanyAuction", "raffle"="CompanyRaffle"})
|
2009-09-15 16:24:38 +04:00
|
|
|
*/
|
2010-04-15 20:36:17 +04:00
|
|
|
abstract class CompanyEvent {
|
2009-09-15 16:24:38 +04:00
|
|
|
/**
|
|
|
|
* @Id @Column(type="integer")
|
2010-04-10 02:00:36 +04:00
|
|
|
* @GeneratedValue
|
2009-09-15 16:24:38 +04:00
|
|
|
*/
|
|
|
|
private $id;
|
|
|
|
|
|
|
|
/**
|
2010-04-10 02:00:36 +04:00
|
|
|
* @ManyToOne(targetEntity="CompanyOrganization", inversedBy="events", cascade={"persist"})
|
2009-09-15 16:24:38 +04:00
|
|
|
* @JoinColumn(name="org_id", referencedColumnName="id")
|
|
|
|
*/
|
|
|
|
private $organization;
|
|
|
|
|
|
|
|
public function getId() {
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getOrganization() {
|
|
|
|
return $this->organization;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setOrganization(CompanyOrganization $org) {
|
|
|
|
$this->organization = $org;
|
|
|
|
}
|
2009-11-03 21:30:21 +03:00
|
|
|
|
2009-09-15 16:24:38 +04:00
|
|
|
}
|