package com.bytesw.bytebot.etl.dao;

import com.bytesw.bytebot.etl.model.Session;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import java.time.OffsetDateTime;

public interface SessionBotRepository extends CrudRepository<Session, Long> {

    @Query("UPDATE Session s set s.lastEventDate = :lastEventDate WHERE s.id = :id")
    void updateLastEventDateBySession(@Param("id") Long id, @Param("lastEventDate") OffsetDateTime dateTime);

}
