package com.seer.teach.user.app.convert;

import com.seer.teach.common.entity.CityEntity;
import com.seer.teach.user.app.user.controller.resp.CityResp;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface CityConvert {

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

    @Mapping(source = "params.id", target = "cityId")
    CityResp toCityResp(CityEntity params);

    List<CityResp> toCityRespList(List<CityEntity> cityEntityList);
}