ServiceSecurity.php 891 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace app\common\model\supplier;
  3. use app\common\model\BaseModel;
  4. /**
  5. * 供应商服务保障模型
  6. */
  7. class ServiceSecurity extends BaseModel
  8. {
  9. protected $pk = 'service_security_id';
  10. protected $name = 'supplier_service_security';
  11. /**
  12. * 所有
  13. * @return \think\Collection
  14. * @throws \think\db\exception\DataNotFoundException
  15. * @throws \think\db\exception\DbException
  16. * @throws \think\db\exception\ModelNotFoundException
  17. */
  18. public static function getALL($map=[])
  19. {
  20. $model = new static;
  21. if($map){
  22. $model=$model->where($map);
  23. }
  24. return $model->order(['create_time' => 'asc'])->select();
  25. }
  26. /**
  27. * 详情
  28. */
  29. public static function detail($service_security_id)
  30. {
  31. return (new static())->find($service_security_id);
  32. }
  33. }