DisplayAttributesCast.php 770 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. *
  22. * @var string
  23. */
  24. public string $wareHouse_type = '1';
  25. /**
  26. * 分类
  27. * @var int $cate
  28. */
  29. public int $cate = 0;
  30. }