package com.utic.center.utic.traf.server.dao.repository.utic;

import com.utic.center.common.annotation.SqlOperation;
import com.utic.center.common.dto.ProcessStateDto;
import com.utic.center.utic.traf.server.dao.mapper.utic.ProcessStateMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;

@Repository
@RequiredArgsConstructor
public class ProcessStateRepository {

    private final ProcessStateMapper mapper;

    @SqlOperation(type = SqlOperation.SqlType.UPDATE, table = "PROCESS_STATE")
    public int updateProcessState(ProcessStateDto obj) {
        return this.mapper.updateProcessState(obj);
    }

    @SqlOperation(type = SqlOperation.SqlType.UPDATE, table = "PROCESS_STATE", param = "start")
    public int updateProcessStateStart(ProcessStateDto obj) {
        return this.mapper.updateProcessStateStart(obj);
    }

    @SqlOperation(type = SqlOperation.SqlType.UPDATE, table = "PROCESS_STATE", param = "stop")
    public int updateProcessStateStop(ProcessStateDto obj) {
        return this.mapper.updateProcessStateStop(obj);
    }

}
