Category.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2017~2021 https://www.yiovo.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
  8. // +----------------------------------------------------------------------
  9. // | Author: 萤火科技 <admin@yiovo.com>
  10. // +----------------------------------------------------------------------
  11. declare (strict_types = 1);
  12. namespace app\api\model;
  13. use app\common\model\Category as CategoryModel;
  14. /**
  15. * 商品分类模型
  16. * Class Category
  17. * @package app\common\model
  18. */
  19. class Category extends CategoryModel
  20. {
  21. /**
  22. * 隐藏字段
  23. * @var array
  24. */
  25. protected $hidden = [
  26. 'store_id',
  27. 'create_time',
  28. 'update_time'
  29. ];
  30. /**
  31. * 获取列表记录
  32. * @param array $param
  33. * @return array
  34. * @throws \think\db\exception\DataNotFoundException
  35. * @throws \think\db\exception\DbException
  36. * @throws \think\db\exception\ModelNotFoundException
  37. */
  38. public function getList(array $param = [])
  39. {
  40. return parent::getList(array_merge($param, ['status' => 1]));
  41. }
  42. }