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

import com.red.circle.other.domain.rocket.RocketHistory;
import com.red.circle.other.infra.database.mongo.document.RocketHistoryDocument;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 火箭历史转换器
 *
 * @author system
 * @date 2025-01-15
 */
@Mapper(componentModel = "spring")
public interface RocketHistoryConvertor {

    RocketHistoryConvertor INSTANCE = Mappers.getMapper(RocketHistoryConvertor.class);

    /**
     * Document转Domain
     */
    RocketHistory toDomain(RocketHistoryDocument document);

    /**
     * Domain转Document
     */
    RocketHistoryDocument toDocument(RocketHistory history);
}
