<?php

class AdModel extends CI_Model
{

    public static function getAdSlotGroupRewards(){
        $tbl = otable::adSlotGroupRewards();
        $configs = oo::commonOprDb('slavedb')->getAll("select * from {$tbl}");
        foreach ($configs as &$config){
            $config['condition'] = array_column(json_decode($config['condition'], true), null, 'type');
            $config['reward_list'] = json_decode($config['reward_list'], true);
        }
        return $configs;
    }

}