package com.its.vds.stat.server.dao.repository;

import com.its.vds.stat.server.annotation.SqlOperation;
import com.its.vds.stat.server.dao.mapper.VdsStatMapper;
import com.its.vds.stat.server.dto.VdsStatTimeDto;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;

@Repository
@RequiredArgsConstructor
public class VdsStatRepository {

    private final VdsStatMapper mapper;
    @SqlOperation(type = SqlOperation.SqlType.DELETE, table = "TB_VDS_DTCT_HS")
    public int delVdsDtctHs(VdsStatTimeDto obj) {
        return this.mapper.delVdsDtctHs(obj);
    }

    @SqlOperation(type = SqlOperation.SqlType.DELETE, table = "TB_VDS_DTCT_15M_STAT")
    public int delVdsDtct15MinStat(VdsStatTimeDto obj) {
        return this.mapper.delVdsDtct15MinStat(obj);
    }

    @SqlOperation(type = SqlOperation.SqlType.DELETE, table = "TB_VDS_DTCT_HH_STAT")
    public int delVdsDtctHhStat(VdsStatTimeDto obj) {
        return this.mapper.delVdsDtctHhStat(obj);
    }

    @SqlOperation(type = SqlOperation.SqlType.DELETE, table = "TB_VDS_DTCT_DD_STAT")
    public int delVdsDtctDdStat(VdsStatTimeDto obj) {
        return this.mapper.delVdsDtctDdStat(obj);
    }


    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "TB_VDS_DTCT_HS")
    public int crtVdsDtctHs(VdsStatTimeDto obj) {
        return this.mapper.crtVdsDtctHs(obj);
    }

    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "TB_VDS_DTCT_15M_STAT")
    public int crtVdsDtct15MinStat(VdsStatTimeDto obj) {
        return this.mapper.crtVdsDtct15MinStat(obj);
    }

    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "TB_VDS_DTCT_HH_STAT")
    public int crtVdsDtctHhStat(VdsStatTimeDto obj) {
        return this.mapper.crtVdsDtctHhStat(obj);
    }

    @SqlOperation(type = SqlOperation.SqlType.INSERT, table = "TB_VDS_DTCT_DD_STAT")
    public int crtVdsDtctDdStat(VdsStatTimeDto obj) {
        return this.mapper.crtVdsDtctDdStat(obj);
    }

    @SqlOperation(type = SqlOperation.SqlType.MERGE, table = "TB_VDS_DTCT_MN_STAT")
    public int crtVdsDtctMnStat(VdsStatTimeDto obj) {
        return this.mapper.crtVdsDtctMnStat(obj);
    }

    @SqlOperation(type = SqlOperation.SqlType.MERGE, table = "TB_VDS_DTCT_YY_STAT")
    public int crtVdsDtctYyStat(VdsStatTimeDto obj) {
        return this.mapper.crtVdsDtctYyStat(obj);
    }
}
