package com.seer.teach.mall.convert;

import com.seer.teach.mall.entity.AddressEntity;
import com.seer.teach.mall.request.AddressSaveReq;
import com.seer.teach.mall.request.AddressUpdateReq;
import com.seer.teach.mall.response.AddressResp;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * @Author: 嘉多宝宝
 * @Data: 2025-06-26 15:24
 */
@Mapper(componentModel = "spring")
public interface AddressConvert {
    AddressResp toResp(AddressEntity addressEntity);

    List<AddressResp> toList(List<AddressEntity> list);

    @Mapping(target = "userId",ignore = true)
    AddressEntity addressSave(AddressSaveReq params);

    AddressEntity addressUpdate(AddressUpdateReq params);

}
