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

42 lines
745 B
PHP

<?php
namespace Doctrine\Tests\Models\Legacy;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @Entity
* @Table(name="legacy_cars")
*/
class LegacyCar
{
/**
* @Id
* @GeneratedValue
* @Column(name="iCarId", type="integer", nullable=false)
*/
public $id;
/**
* @ManyToMany(targetEntity="LegacyUser", mappedBy="cars")
*/
public $users;
/**
* @Column(name="sDescription", type="string", length=255, unique=true)
*/
public $description;
function getDescription()
{
return $this->description;
}
public function addUser(LegacyUser $user) {
$this->users[] = $user;
}
public function getUsers() {
return $this->users;
}
}