Item.php 380 Bytes
Newer Older
Qiang Xue committed
1 2 3 4
<?php

namespace yiiunit\data\ar;

5 6 7 8 9 10 11
/**
 * Class Item
 *
 * @property integer $id
 * @property string $name
 * @property integer $category_id
 */
Qiang Xue committed
12 13
class Item extends ActiveRecord
{
14 15
    public static function tableName()
    {
16
        return 'item';
17
    }
18

19 20 21 22
    public function getCategory()
    {
        return $this->hasOne(Category::className(), ['id' => 'category_id']);
    }
Zander Baldwin committed
23
}