store_class.model.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * 店铺类别模型
  4. *
  5. *
  6. *
  7. *
  8. */
  9. defined('InShopNC') or exit('Access Invalid!');
  10. class store_classModel extends Model {
  11. public function __construct(){
  12. parent::__construct('store_class');
  13. }
  14. /**
  15. * 取店铺类别列表
  16. * @param unknown $condition
  17. * @param string $pagesize
  18. * @param string $order
  19. */
  20. public function getStoreClassList($condition = array(), $pagesize = '', $limit = '', $order = 'sc_sort asc,sc_id asc') {
  21. return $this->where($condition)->order($order)->page($pagesize)->limit($limit)->select();
  22. }
  23. /**
  24. * 取得单条信息
  25. * @param unknown $condition
  26. */
  27. public function getStoreClassInfo($condition = array()) {
  28. return $this->where($condition)->find();
  29. }
  30. /**
  31. * 删除类别
  32. * @param unknown $condition
  33. */
  34. public function delStoreClass($condition = array()) {
  35. return $this->where($condition)->delete();
  36. }
  37. /**
  38. * 增加店铺分类
  39. * @param unknown $data
  40. * @return boolean
  41. */
  42. public function addStoreClass($data) {
  43. return $this->insert($data);
  44. }
  45. /**
  46. * 更新分类
  47. * @param unknown $data
  48. * @param unknown $condition
  49. */
  50. public function editStoreClass($data = array(),$condition = array()) {
  51. return $this->where($condition)->update($data);
  52. }
  53. }