SystemGroupData.php 862 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author xaboy
  6. * @day 2020-03-27
  7. *
  8. *
  9. */
  10. namespace app\common\model\system\groupData;
  11. use app\common\model\BaseModel;
  12. /**
  13. * Class SystemGroupData
  14. * @package app\common\model\system\groupData
  15. * @author xaboy
  16. * @day 2020-03-30
  17. */
  18. class SystemGroupData extends BaseModel
  19. {
  20. /**
  21. * @return string
  22. * @author xaboy
  23. * @day 2020-03-30
  24. */
  25. public static function tablePk(): string
  26. {
  27. return 'group_data_id';
  28. }
  29. /**
  30. * @return string
  31. * @author xaboy
  32. * @day 2020-03-30
  33. */
  34. public static function tableName(): string
  35. {
  36. return 'system_group_data';
  37. }
  38. public static function getValueAttr($val)
  39. {
  40. return json_decode($val, true);
  41. }
  42. public static function setValueAttr($val)
  43. {
  44. return json_encode($val);
  45. }
  46. }