SystemCrud.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * +----------------------------------------------------------------------
  4. * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  5. * +----------------------------------------------------------------------
  6. * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  7. * +----------------------------------------------------------------------
  8. * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  9. * +----------------------------------------------------------------------
  10. * | Author: CRMEB Team <admin@crmeb.com>
  11. * +----------------------------------------------------------------------
  12. */
  13. namespace app\model\system;
  14. use crmeb\basic\BaseModel;
  15. /**
  16. * Class SystemCrud
  17. * @author 等风来
  18. * @email 136327134@qq.com
  19. * @date 2023/4/6
  20. * @package app\model\system
  21. */
  22. class SystemCrud extends BaseModel
  23. {
  24. /**
  25. * @var string
  26. */
  27. protected $name = 'system_crud';
  28. /**
  29. * @var string
  30. */
  31. protected $pk = 'id';
  32. public function getAddTimeAttr($value)
  33. {
  34. return date('Y-m-d H:i:s', $value);
  35. }
  36. public function getFieldAttr($value)
  37. {
  38. return json_decode($value, true);
  39. }
  40. public function getMenuIdsAttr($value)
  41. {
  42. return json_decode($value, true);
  43. }
  44. public function getMakePathAttr($value)
  45. {
  46. return json_decode($value, true);
  47. }
  48. public function getRouteIdsAttr($value)
  49. {
  50. return json_decode($value, true);
  51. }
  52. }