SysVersion.php 672 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace App\Models;
  3. class SysVersion extends SoftBaseModel
  4. {
  5. /**
  6. * 苹果
  7. */
  8. const TYPE_1 = 1;
  9. /**
  10. * 安卓
  11. */
  12. const TYPE_2 = 2;
  13. static public $typeMap = [
  14. self::TYPE_1 => '苹果',
  15. self::TYPE_2 => '安卓',
  16. ];
  17. /**
  18. * 否
  19. */
  20. const IS_MUST_0 = 0;
  21. /**
  22. * 是
  23. */
  24. const IS_MUST_1 = 1;
  25. static public $isMustMap = [
  26. self::IS_MUST_0 => '否',
  27. self::IS_MUST_1 => '是',
  28. ];
  29. public function getWebUrlAttribute()
  30. {
  31. return isset($this->attributes['web_url']) ? config('console.pic_path').$this->attributes['web_url'] : '';
  32. }
  33. }