hasMany(StockDetail::class,'type_id', 'type_id')->field('type_id,num'); } }