1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/models/TestMovie.php

28 lines
848 B
PHP

<?php
class TestMovie extends Doctrine_Record
{
public function setUp()
{
$this->hasOne('TestUser as User',
array('local' => 'user_id',
'foreign' => 'id'));
$this->hasMany('TestUser as MovieBookmarks',
array('local' => 'movie_id',
'foreign' => 'user_id',
'refClass' => 'TestMovieUserBookmark'));
$this->hasMany('TestUser as MovieVotes',
array('local' => 'movie_id',
'foreign' => 'user_id',
'refClass' => 'TestMovieUserVote'));
}
public function setTableDefinition()
{
$this->hasColumn('user_id', 'integer', null);
$this->hasColumn('name', 'string', 30);
}
}