<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Administrator
 * Date: 18-8-8
 * Time: 下午3:58
 * To change this template use File | Settings | File Templates.
 */
class Service_InventoryBatchSerialOutbound extends Common_Service
{
    /**
     * @var null
     */
    public static $_modelClass = null;

    public static function getModelInstance(){
        if(is_null(self::$_modelClass)){
            self::$_modelClass = new Table_InventoryBatchSerialOutbound();
        }
        return self::$_modelClass;
    }

    public static function add($row){
        $model = self::getModelInstance();
        return $model->add($row);
    }

    public static function delete($value,$field="ibso_id"){
        $model = self::getModelInstance();
        return $model->delete($value,$field);
    }

    public static function getByField($value, $field = 'ibso_id', $colums = "*"){
        $model = self::getModelInstance();
        return $model->getByField($value, $field,$colums);
    }

    public static function update($row,$value,$field = 'ibso_id'){
        $model = self::getModelInstance();
        return $model->update($value, $field,$field);
    }

    public static function getAll(){
        $model = self::getModelInstance();
        return $model->getAll();
    }

    public static function getByCondition($condition = array(), $type = '*', $pageSize = 0, $page = 1, $orderBy = ""){
        $model = self::getModelInstance();
        return $model->getByCondition($condition, $type, $pageSize, $page, $orderBy);
    }

}
