package cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support;

import cokr.xit.ens.core.utils.MapDeserailizer;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendDetail;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendMast;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import lombok.RequiredArgsConstructor;

import java.util.List;
import java.util.Map;

@RequiredArgsConstructor
public abstract class AcceptData<T> {

    protected final Gson gson = new GsonBuilder().registerTypeAdapter(Map.class, new MapDeserailizer()).disableHtmlEscaping().create();

    protected final IntgrnSendMast intgrnSendMast;
    protected final List<IntgrnSendDetail> intgrnSendDetails;
    protected final Boolean isReserveSend;

    public abstract T createReqDto();

    public List<IntgrnSendDetail> getIntgrnSendDetails() {
        return this.intgrnSendDetails;
    }
    public Boolean IsReserveSend() {
        return this.isReserveSend;
    }

}
