1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/tests/Doctrine/Tests/Models/Company/CompanyEvent.php

36 lines
849 B
PHP
Raw Normal View History

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;
2011-12-20 01:56:19 +04:00
2009-09-15 16:24:38 +04:00
public function getId() {
return $this->id;
}
2011-12-20 01:56:19 +04:00
2009-09-15 16:24:38 +04:00
public function getOrganization() {
return $this->organization;
}
2011-12-20 01:56:19 +04:00
2009-09-15 16:24:38 +04:00
public function setOrganization(CompanyOrganization $org) {
$this->organization = $org;
}
2011-12-20 01:56:19 +04:00
2009-09-15 16:24:38 +04:00
}