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