OrderItem.php 332 Bytes
Newer Older
Qiang Xue committed
1 2 3 4 5 6
<?php

namespace yiiunit\data\ar;

class OrderItem extends ActiveRecord
{
Qiang Xue committed
7
	public static function tableName()
Qiang Xue committed
8 9 10 11
	{
		return 'tbl_order_item';
	}

Qiang Xue committed
12
	public function getOrder()
Qiang Xue committed
13
	{
Qiang Xue committed
14 15 16
		return $this->hasOne('Order', array('id' => 'order_id'));
	}

Qiang Xue committed
17
	public function getItem()
Qiang Xue committed
18 19
	{
		return $this->hasOne('Item', array('id' => 'item_id'));
Qiang Xue committed
20
	}
Zander Baldwin committed
21
}