SystemGroupData.php 784 B

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