store_extend.model.php 971 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * 店铺扩展模型
  4. *
  5. *
  6. *
  7. *
  8. */
  9. defined('InShopNC') or exit('Access Invalid!');
  10. class store_extendModel extends Model {
  11. public function __construct(){
  12. parent::__construct('store_extend');
  13. }
  14. /**
  15. * 查询店铺扩展信息
  16. *
  17. * @param int $store_id 店铺编号
  18. * @param string $field 查询字段
  19. * @return array
  20. */
  21. public function getStoreExtendInfo($condition, $field = '*') {
  22. return $this->field($field)->where($condition)->find();
  23. }
  24. /*
  25. * 编辑店铺扩展信息
  26. *
  27. * @param array $update 更新信息
  28. * @param array $condition 条件
  29. * @return bool
  30. */
  31. public function editStoreExtend($update, $condition){
  32. return $this->where($condition)->update($update);
  33. }
  34. /*
  35. * 删除店铺扩展信息
  36. */
  37. public function delStoreExtend($condition)
  38. {
  39. return $this->where($condition)->delete();
  40. }
  41. }