<?php

namespace DAO\Storage;


class GoodsImagesStorageModel extends \DAO\AbstractModel {



    /**
     * 表名
     *
     * @var string
     */
    protected $_tableName = 'han_goods_images_storage';

    /**
     * 主键
     *
     * @var string
     */
    protected $_primaryKey = 'goods_image_id';
    public function init(){

    }

    public function getListByCommonId($goodsCommonId,$field){
        $this->setDb();
        return $this->db->select($field)->from($this->_tableName)->where(array('goods_commonid'=>$goodsCommonId))->fetchAll();
    }

    /**
     * 类实例
     *
     * @var \DAO\UserModel
     */
    private static $_instance = null;

    /**
     * 获取类实例
     *
     * @return \DAO\UserModel
     */
    public static function getInstance() {
        if (!(self::$_instance instanceof self)) {
            self::$_instance = new self();
        }

        return self::$_instance;
    }

}
