/**
  * @return \yii\db\ActiveQuery
  */
 public function getorder()
 {
     return $this->hasOne(order::className(), ['id' => 'order_id']);
 }
示例#2
0
 public function getOrders()
 {
     $orders = $this->hasMany(order::className(), ['name' => 'zhangsan']);
 }