EventPrice.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\wap\model\activity;
  12. use traits\ModelTrait;
  13. use basic\ModelBasic;
  14. class EventPrice extends ModelBasic
  15. {
  16. use ModelTrait;
  17. /**
  18. *获取 活动人数及对应价格列表
  19. */
  20. public static function eventPriceList($id = 0)
  21. {
  22. $list = self::where(['event_id' => $id])->order('sort DESC,id ASC')->select();
  23. return count($list) > 0 ? $list->toArray() : [];
  24. }
  25. /**
  26. * 获取单个最低价格
  27. */
  28. public static function getminEventPrice($id = 0)
  29. {
  30. return self::where(['event_id' => $id])->order('event_number ASC')->find();
  31. }
  32. }