wikipoints/ground/models/Point.php

19 lines
363 B
PHP

<?php
class Point extends Model
{
function __construct($fromArray = array())
{
$this->_tableName_ = 'points';
parent::__construct($fromArray);
$this->setRelation('category', 'categoryId', 'Category', 'id', self::TO_ONE);
$this->setRelation('authorUser', 'author', 'User', 'id', self::TO_ONE);
}
static function model()
{
return new self();
}
}