<?php

namespace app\common\model;


use think\Model;

class Storenavigation extends Model
{
      protected static function init()
      {
          parent::init(); // TODO: Change the autogenerated stub
      }

    /**
     * 读取列表
     * @param array $condition
     *
     */
    public function getStoreNavigationList($condition, $page='', $order='', $field='*') {
        $result = db('storenavigation')->field($field)->where($condition)->page($page)->order($order)->select();
        return $result;
    }

    /**
     * 读取单条记录
     * @param array $condition
     *
     */
    public function getStoreNavigationInfo($condition) {
        $result = db('storenavigation')->where($condition)->find();
        return $result;
    }

    /*
     * 增加
     * @param array $param
     * @return bool
     */
    public function addStoreNavigation($param){
        return db('storenavigation')->insert($param);
    }

    /*
     * 更新
     * @param array $update
     * @param array $condition
     * @return bool
     */
    public function editStoreNavigation($update, $condition){
        return db('storenavigation')->where($condition)->update($update);
    }

    /*
     * 删除
     * @param array $condition
     * @return bool
     */
    public function delStoreNavigation($condition){
        return db('storenavigation')->where($condition)->delete();
    }
}