MessageSystem.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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\system;
  12. use crmeb\basic\BaseModel;
  13. use crmeb\traits\ModelTrait;
  14. use think\Model;
  15. /**
  16. * 系统等级设置模型
  17. * Class SystemUserLevel
  18. * @package app\model\system
  19. */
  20. class MessageSystem extends BaseModel
  21. {
  22. use ModelTrait;
  23. /**
  24. * 数据表主键
  25. * @var string
  26. */
  27. protected $pk = 'id';
  28. /**
  29. * 模型名称
  30. * @var string
  31. */
  32. protected $name = 'message_system';
  33. protected $insert = ['add_time'];
  34. /**
  35. * ID搜索器
  36. * @param Model $query
  37. * @param $value
  38. * @param $data
  39. */
  40. public function searchIdAttr($query, $value, $data)
  41. {
  42. $query->where('id', $value);
  43. }
  44. /**
  45. * UID搜索器
  46. * @param Model $query
  47. * @param $value
  48. * @param $data
  49. */
  50. public function searchUidAttr($query, $value, $data)
  51. {
  52. $query->where('uid', $value);
  53. }
  54. /**
  55. * Look搜索器
  56. * @param Model $query
  57. * @param $value
  58. * @param $data
  59. */
  60. public function searchLookAttr($query, $value, $data)
  61. {
  62. $query->where('look', $value);
  63. }
  64. /**
  65. * del搜索器
  66. * @param Model $query
  67. * @param $value
  68. * @param $data
  69. */
  70. public function searchIsDelAttr($query, $value, $data)
  71. {
  72. $query->where('is_del', $value);
  73. }
  74. }