package com.red.circle.other.infra.convertor.team;

import com.red.circle.framework.core.convertor.ConvertorModel;
import com.red.circle.other.infra.database.mongo.dto.team.TeamBillMemberTarget;
import com.red.circle.other.infra.database.mongo.dto.team.query.TeamMemberTargetQuery;
import com.red.circle.other.infra.database.mongo.entity.team.team.TeamApplicationProcess;
import com.red.circle.other.infra.database.mongo.entity.team.team.TeamApplicationProcessApproval;
import com.red.circle.other.infra.database.mongo.entity.team.team.TeamBillCycle;
import com.red.circle.other.infra.database.mongo.entity.team.team.TeamMember;
import com.red.circle.other.infra.database.mongo.entity.team.team.TeamMemberChangeRecord;
import com.red.circle.other.infra.database.mongo.entity.team.team.TeamMemberTarget;
import com.red.circle.other.infra.database.mongo.entity.team.team.TeamNotice;
import com.red.circle.other.infra.database.mongo.entity.team.team.TeamPolicyManager;
import com.red.circle.other.infra.database.mongo.entity.team.team.TeamProfile;
import com.red.circle.other.infra.database.mongo.entity.team.team.TeamSalaryPayment;
import com.red.circle.other.infra.database.rds.entity.team.BillDiamondBalance;
import com.red.circle.other.infra.database.rds.entity.team.UserHistoryIdentity;
import com.red.circle.other.inner.model.cmd.team.TeamApplicationProcessApprovalCmd;
import com.red.circle.other.inner.model.cmd.team.TeamMemberCmd;
import com.red.circle.other.inner.model.cmd.team.TeamMemberWorkQryCmd;
import com.red.circle.other.inner.model.cmd.team.TeamNoticeCmd;
import com.red.circle.other.inner.model.cmd.team.TeamPolicyManagerCmd;
import com.red.circle.other.inner.model.cmd.team.TeamProfileCmd;
import com.red.circle.other.inner.model.cmd.team.TeamUpdateCmd;
import com.red.circle.other.inner.model.dto.agency.agency.*;
import com.red.circle.other.inner.enums.team.TeamMemberTargetIndex;
import com.red.circle.other.inner.enums.team.TeamMemberTargetSettlementResult;
import java.util.List;
import java.util.Map;
import org.mapstruct.Mapper;

/**
 * @author pengliang on 2023/12/15
 */
@Mapper(componentModel = ConvertorModel.SPRING)
public interface TeamInfraConvertor {

  TeamMemberDTO toTeamMemberDTO(TeamMember teamMember);

  TeamMemberTargetQuery toTeamMemberTargetQuery(TeamMemberWorkQryCmd cmd);

  TeamMemberWorkDailyTargetDTO toTeamMemberWorkDailyTargetDTO(
      TeamMemberTargetIndex teamMemberTargetIndex);

  TeamMemberWorkTargetSettleDTO toTeamMemberWorkTargetSettleDTO(
      TeamMemberTargetSettlementResult result);

  TeamMemberWorkTargetSettleDTO toTeamMemberWorkTargetSettleDTO(TeamBillMemberTarget target);

  TeamPolicyManagerDTO toTeamPolicyManagerDTO(TeamPolicyManager teamPolicyManager);

  List<TeamNoticeDTO> toListTeamNoticeDTO(List<TeamNotice> list);

  TeamSalaryPaymentDTO toTeamSalaryPaymentDTO(TeamSalaryPayment teamSalaryPayment);


  Map<Long, UserHistoryIdentityDTO> toMapUserHistoryIdentityDTO(Map<Long, UserHistoryIdentity> map);

  UserHistoryIdentity toUserHistoryIdentity(UserHistoryIdentityDTO dto);

  TeamMemberTarget toTeamMemberTargetDTO(TeamMemberTargetDTO dto);

  TeamPolicyManager toTeamPolicyManager(TeamPolicyManagerCmd cmd);

  TeamPolicyManager toTeamPolicyManager(TeamPolicyManagerDTO dto);

  TeamBillMemberTargetDTO toTeamBillMemberTargetDTO(TeamBillMemberTarget target);

  List<TeamPolicyManagerDTO> toListTeamPolicyManagerDTO(List<TeamPolicyManager> list);

  TeamMember toTeamMember(TeamMemberCmd cmd);

  TeamMemberChangeRecordDTO toTeamMemberChangeRecordDTO(
      TeamMemberChangeRecord teamMemberChangeRecord);


  TeamApplicationProcessApprovalCmd toTeamApplicationProcessApprovalCmd(
      TeamApplicationProcessApproval teamApplicationProcessApproval);

  TeamApplicationProcessApproval toTeamApplicationProcessApproval(
      TeamApplicationProcessApprovalCmd teamApplicationProcessApproval);

  List<TeamApplicationProcessApprovalDTO> toListTeamApplicationProcessApprovalDTO(
      List<TeamApplicationProcessApproval> list);

  List<TeamApplicationProcessDTO> toListTeamApplicationProcessDTO(
      List<TeamApplicationProcess> list);

  List<TeamMemberDTO> toListTeamMemberDTO(List<TeamMember> teamMembers);

  Map<String, TeamPolicyManagerDTO> toMapTeamPolicyManagerDTO(Map<String, TeamPolicyManager> map);

  TeamNotice toTeamNotice(TeamNoticeCmd cmd);

  TeamContactDTO toTeamContactDTO(TeamContact teamContact);

  TeamProfile toTeamProfile(TeamProfileDTO dto);

  TeamApplicationProcessDTO toTeamApplicationProcessDTO(
      TeamApplicationProcess teamApplicationProcess);

  TeamProfile toTeamProfile(TeamUpdateCmd cmd);

  TeamProfile toTeamProfile(TeamProfileCmd cmd);

  TeamProfileDTO toTeamProfileDTO(TeamProfile teamProfile);

  List<TeamProfileDTO> toListTeamProfileDTO(List<TeamProfile> teamProfile);

  List<TeamBillCycleDTO> toListTeamBillCycleDTO(List<TeamBillCycle> queryTeamBillByCondition);

  TeamBillCycleDTO toTeamBillCycleDTO(TeamBillCycle teamBillCycle);

  BillDiamondBalanceDTO toBillDiamondBalanceDTO(BillDiamondBalance teamBillCycle);
}
