SystemConfig.php 823 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace app\common\model\system\config;
  3. use app\common\model\BaseModel;
  4. use think\model\relation\HasOne;
  5. /**
  6. * Class SystemConfig
  7. * @package app\common\model\system\config
  8. * @author zfy
  9. * @day 2020-03-30
  10. */
  11. class SystemConfig extends BaseModel
  12. {
  13. /**
  14. * @return string
  15. * @author zfy
  16. * @day 2020-03-30
  17. */
  18. public static function tablePk(): string
  19. {
  20. return 'config_id';
  21. }
  22. /**
  23. * @return string
  24. * @author zfy
  25. * @day 2020-03-30
  26. */
  27. public static function tableName(): string
  28. {
  29. return 'system_config';
  30. }
  31. /**
  32. * @return HasOne
  33. * @author zfy
  34. * @day 2020-03-30
  35. */
  36. public function classify()
  37. {
  38. return $this->hasOne(SystemConfig::class, 'config_classify_id', 'config_classify_id');
  39. }
  40. }