DisplayAttributesCast.php 872 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. namespace App\Module\GameItems\Casts;
  3. use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
  4. use Illuminate\Database\Eloquent\Model;
  5. use JsonMapper;
  6. /**
  7. * 物品展示属性类型转换器
  8. *
  9. * 用于将数据库中存储的JSON格式的物品展示属性转换为PHP对象,以及将PHP对象转换回JSON格式。
  10. * 物品展示属性包含用于界面展示的属性,如图标路径等。
  11. */
  12. class DisplayAttributesCast extends \UCore\Model\CastsAttributes
  13. {
  14. /**
  15. * 客户端图标地址
  16. * @var string $img
  17. */
  18. public string $img = '';
  19. /**
  20. * 标题图片
  21. * @var string $img_title
  22. */
  23. public string $img_title = '';
  24. /**
  25. * 仓库类型
  26. *
  27. * @var string
  28. */
  29. public string $wareHouse_type = '1';
  30. /**
  31. * 分类
  32. * @var int $cate
  33. */
  34. public int $cate = 0;
  35. }