CommonModelMapEnum.php 687 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace addons\TinyShop\common\enums;
  3. use common\enums\BaseEnum;
  4. use common\models\merchant\Merchant;
  5. use addons\TinyShop\common\models\product\Product;
  6. /**
  7. * 公用映射类
  8. *
  9. * 必须带有字段 collect_num, transmit_num, nice_num
  10. *
  11. * Class CommonModelMapEnum
  12. * @package addons\TinyShop\common\enums
  13. * @author jianyan74 <751393839@qq.com>
  14. */
  15. class CommonModelMapEnum extends BaseEnum
  16. {
  17. const PRODUCT = 'product';
  18. const MERCHANT = 'merchant';
  19. /**
  20. * @return array
  21. */
  22. public static function getMap(): array
  23. {
  24. return [
  25. self::PRODUCT => Product::class,
  26. self::MERCHANT => Merchant::class,
  27. ];
  28. }
  29. }
粤ICP备19079148号