SystemConfig.php 903 B

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