StoreServiceFeedback.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\model\service;
  12. use crmeb\basic\BaseModel;
  13. use crmeb\traits\ModelTrait;
  14. use think\Model;
  15. /**
  16. * 客服留言反馈
  17. * Class StoreServiceFeedback
  18. * @package app\model\service
  19. */
  20. class StoreServiceFeedback extends BaseModel
  21. {
  22. use ModelTrait;
  23. /**
  24. * @var string
  25. */
  26. protected $name = 'store_service_feedback';
  27. /**
  28. * @var string
  29. */
  30. protected $pk = 'id';
  31. /**
  32. * @param $value
  33. * @return false|string
  34. */
  35. public function getAddTimeAttr($value)
  36. {
  37. return date('Y-m-d H:i:s', $value);
  38. }
  39. /**
  40. * 标题搜索
  41. * @param Model $query
  42. * @param $value
  43. */
  44. public function searchTitleAttr($query, $value)
  45. {
  46. $value && $query->whereLike('rela_name|phone|content|uid', "%" . $value . "%");
  47. }
  48. }