package com.red.circle.other.app.inner.convertor.material;

import com.red.circle.framework.core.convertor.ConvertorModel;
import com.red.circle.other.infra.database.rds.entity.badge.BadgeBackpack;
import com.red.circle.other.infra.database.rds.entity.badge.BadgeConfig;
import com.red.circle.other.infra.database.rds.entity.badge.BadgePictureConfig;
import com.red.circle.other.inner.model.cmd.sys.SysBadgePictureConfigParamCmd;
import com.red.circle.other.inner.model.dto.material.BadgeBackpackDTO;
import com.red.circle.other.inner.model.dto.material.BadgeConfigDTO;
import com.red.circle.other.inner.model.dto.material.BadgePictureConfigDTO;
import com.red.circle.other.inner.model.dto.sys.GiveBadgeConfigDTO;
import com.red.circle.other.inner.model.dto.sys.SelectBadgeDTO;
import com.red.circle.other.inner.model.dto.sys.SysBadgeConfigInfoDTO;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import org.mapstruct.Mapper;

/**
 * @author pengliang on 2023/6/5
 */
@Mapper(componentModel = ConvertorModel.SPRING)
public interface BadgeInnerConvertor {

  BadgeBackpackDTO toBadgeBackpack(BadgeBackpack backpack);

  List<BadgeBackpackDTO> toListBadgeBackpackDTO(List<BadgeBackpack> backpacks);

  BadgeBackpack toBadgeBackpack(BadgeBackpackDTO backpack);

  BadgePictureConfigDTO toBadgePictureConfigDTO(BadgePictureConfig badgePictureConfig);

  Map<Long, BadgePictureConfigDTO> toMapBadgePictureConfigDTO(Map<Long, BadgePictureConfig> map);

  Map<Long, BadgeConfigDTO> tpMapBadgeConfigDTO(Map<Long, BadgeConfig> badgeConfigMap);

  List<SelectBadgeDTO> toListSelectBadgeDTO(List<BadgeConfig> badgeConfig);

  GiveBadgeConfigDTO toGiveBadgeConfigDTO(BadgeConfig badgeConfig);

  BadgeConfig toBadgeConfig(BadgeConfigDTO badgeConfigDTO);

  SysBadgeConfigInfoDTO toSysBadgeConfigInfoDTO(BadgeConfig sysBadgeConfig);

  List<BadgePictureConfigDTO> toListBadgePictureConfigDTO(
      List<BadgePictureConfig> badgePictureConfigs);

  Map<Long, List<BadgePictureConfigDTO>> toListMapBadgePictureConfigDTO(
      Map<Long, List<BadgePictureConfig>> mapGroupSysBadgePicture);

  BadgePictureConfig toBadgePictureConfig(SysBadgePictureConfigParamCmd param);

  Collection<BadgeBackpack> toListBadgeBackpack(List<BadgeBackpackDTO> badges);
}
