Ronda.php
455 字节
<?php
namespace app\api\model;
use think\Model;
class Ronda extends Model
{
protected $name = 'ronda';
// 追加属性
protected $append = [
'item_info',
];
public function getItemInfoAttr($value,$xq){
$value=[];
$ronda = \db('ronda r')
->join('school s','s.id = r.xq_id')
->where('r.xq_id',$xq)
->select();
$value['ronda'] = $ronda;
return $value;
}
}