package com.red.circle.other.app.inner.service.team.impl;

import com.red.circle.other.infra.database.mongo.service.team.team.TeamImportanceLogService;
import com.red.circle.other.app.inner.convertor.team.TeamImportanceLogInnerConvertor;
import com.red.circle.other.app.inner.service.team.TeamImportanceLogClientService;
import com.red.circle.other.inner.model.dto.agency.logs.TeamImportanceLogDTO;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 团队关键日志.
 *
 * @author pengliang on 2023/11/21
 */
@Service
@RequiredArgsConstructor
public class TeamImportanceLogClientServiceImpl implements TeamImportanceLogClientService {

  private final TeamImportanceLogService teamImportanceLogService;
  private final TeamImportanceLogInnerConvertor teamImportanceLogInnerConvertor;

  @Override
  public void add(TeamImportanceLogDTO dto) {
    teamImportanceLogService.add(teamImportanceLogInnerConvertor.toTeamImportanceLog(dto));
  }

  @Override
  public void addBatch(List<TeamImportanceLogDTO> list) {
    teamImportanceLogService.addBatch(
        teamImportanceLogInnerConvertor.toListTeamImportanceLog(list));
  }

}
