package com.jay.monitor.data.server.store.es;

import com.jay.monitor.data.core.enums.MsgTypeEnums;
import com.jay.monitor.data.core.model.serializable.URLDataDTO;
import com.jay.monitor.data.server.models.entity.es.JayMonitorUrlIndex;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

public class ElasticURLStoreProcess extends AbstractElasticSearchStoreProcess<URLDataDTO, JayMonitorUrlIndex> {
    @Override
    public String tableName() {
        return "jay_monitor_url";
    }

    @Override
    public MsgTypeEnums msgTypeEnums() {
        return MsgTypeEnums.URL;
    }

    @Override
    protected JayMonitorUrlIndex builderJayMonitor(URLDataDTO request) {
        JayMonitorUrlIndex index = new JayMonitorUrlIndex();
        BeanUtils.copyProperties(request, index);
        return index;
    }

}
