<?php
class Service_ParcelDetail extends Common_Service{
    private static $_model = NULL;

    private static function getModelInstance() {
        if (is_null(self::$_model)) {
            self::$_model = new Table_ParcelDetail();
        }

        return self::$_model;
    }

    /**
     * @see Table_Account::insert()
     */
    public static function insert($data) {
        $model = self::getModelInstance();

        return $model->insert($data);
    }

    public static function getByField($value, $field = 'order_code', $colums = "*"){
        $model = self::getModelInstance();
        return $model->getByField($value,$field,$colums);
    }

    /**
     * @see Table_Account::update()
     */
    public static function update($data, $value, $key = 'order_code') {
        $model = self::getModelInstance();

        return $model->update($data, $value, $key);
    }

    /**
     * @see Table_Account::delete()
     */
    public static function delete($value, $key = 'order_code') {
        $model = self::getModelInstance();

        return $model->delete($value, $key);
    }
}