You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
555 B
28 lines
555 B
5 years ago
|
<?php
|
||
|
|
||
|
|
||
|
|
||
3 years ago
|
class Model_User_History extends Model_Overwrite
|
||
5 years ago
|
{
|
||
3 years ago
|
protected static $_table_name = 'user_history';
|
||
5 years ago
|
protected static $_primary_key = 'id';
|
||
|
protected static $_properties = array(
|
||
|
'id',
|
||
|
'user_id',
|
||
|
'movie_id',
|
||
|
'watching_time',
|
||
|
'ended_time',
|
||
4 years ago
|
'is_ended'
|
||
5 years ago
|
);
|
||
|
|
||
5 years ago
|
private $_movie = null;
|
||
|
|
||
|
public function getMovie()
|
||
|
{
|
||
|
if(!$this->_movie && $this->movie_id !== null)
|
||
|
$this->_movie = Model_Movie::find_by_pk($this->movie_id);
|
||
|
|
||
|
return $this->_movie;
|
||
|
}
|
||
5 years ago
|
}
|