package com.auto.clicker.autoclicker.room.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;
import androidx.room.Delete;

import com.auto.clicker.autoclicker.room.entity.TouchPoint;

@Dao
public interface TouchPointDao {
    @Insert
    long insertPoint(TouchPoint touchPoint); // 返回新插入的 pointId

    @Query("SELECT * FROM touchPoints WHERE pointId = :pointId LIMIT 1")
    TouchPoint getPointById(long pointId);

    @Delete
    int deletePoint(TouchPoint touchPoint);

    @Update
    int updatePoint(TouchPoint touchPoint);
}
