thinkphp 发布内容跟批量上传的图片插入一张表

新手求教

这两张分别是内容跟图片表
这
这张是公司现在的表
现在需要在其他平台上做一个一样的功能,共用一张表,请问该怎么设计?
这是部分代码

 public function upload($files, $setting, $driver = 'local', $config = null){
        /* 上传文件 */
        $setting['callback'] = array($this, 'isFile');
        $setting['removeTrash'] = array($this, 'removeTrash');
        $Upload = new Upload($setting, $driver, $config);

        foreach ($files as $key => $file) {
            $ext = strtolower($file['ext']);
            if(in_array($ext, array('jpg','jpeg','bmp','png'))){
                hook('dealPicture',$file['tmp_name']);
            }
        }
        $info   = $Upload->upload($files);
        if($info){ //文件上传成功,记录文件信息
            foreach ($info as $key => &$value) {
                /* 已经存在文件记录 */
                if(isset($value['id']) && is_numeric($value['id'])){
                    continue;
                }
                /* 记录文件信息 */
                if(strtolower($driver)=='sae'){
                    $value['path'] = $config['rootPath'].'Picture/'.$value['savepath'].$value['savename']; //在模板里的url路径
                }else{
                    if(strtolower($driver) != 'local'){
                        $value['path'] =$value['url'];
                    }
                    else{
                        $value['path'] = (substr($setting['rootPath'], 1).$value['savepath'].$value['savename']);   //在模板里的url路径
                    }
                }
                $value['type'] = $driver;

                if($this->create($value) && ($id = $this->add())){
                    $value['id'] = $id;
                } else {
                    //TODO: 文件上传成功,但是记录文件信息失败,需记录日志
                    unset($info[$key]);
                }
            }
            foreach($info as &$t_info){
                if($t_info['type'] =='local'){
                    $t_info['path']=get_pic_src($t_info['path']);
                }
                else{
                    $t_info['path']=$t_info['path'];
                }
            }
            return $info; //文件上传成功
        } else {
            $this->error = $Upload->getError();
            return false;
        }
    }

这是opensns源码,准备二次开发,原程序是分内容表跟图片表插入,现在需求是两个程序共用一张表,图片也放在一张表里,如果有熟悉的请不吝指教,我qq965584429,如果愿意指教必定有谢

http://blog.csdn.net/w1365966490/article/details/8996378