You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SystemStorage.php 775B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace app\model\system\config;
  3. use crmeb\basic\BaseModel;
  4. /**
  5. * 云存储
  6. * Class SystemStorage
  7. * @package app\model\system\config
  8. */
  9. class SystemStorage extends BaseModel
  10. {
  11. /**
  12. * @var string
  13. */
  14. protected $name = 'system_storage';
  15. /**
  16. * @var string
  17. */
  18. protected $pk = 'id';
  19. /**
  20. * @var bool
  21. */
  22. protected $autoWriteTimestamp = false;
  23. /**
  24. * @param $query
  25. * @param $value
  26. */
  27. public function searchNameAttr($query, $value)
  28. {
  29. $query->where('name', $value);
  30. }
  31. /**
  32. * @param $query
  33. * @param $value
  34. */
  35. public function searchTypeAttr($query, $value)
  36. {
  37. if ($value !== '') {
  38. $query->where('type', $value);
  39. }
  40. }
  41. }