mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-09 16:57:53 +01:00
23 lines
337 B
PHP
23 lines
337 B
PHP
<?php
|
|
|
|
namespace yiiunit\data\ar;
|
|
|
|
class OrderItem extends ActiveRecord
|
|
{
|
|
public static function tableName()
|
|
{
|
|
return 'tbl_order_item';
|
|
}
|
|
|
|
public static function relations()
|
|
{
|
|
return array(
|
|
'order:Order' => array(
|
|
'on' => '@.order_id = ?.id',
|
|
),
|
|
'item:Item' => array(
|
|
'on' => '@.item_id = ?.id',
|
|
),
|
|
);
|
|
}
|
|
} |