package cn.palmte.work.model;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface NumSeqRepository extends JpaRepository<NumSeq, Integer> {

    @Query(value = "select * from num_seq where id = 1", nativeQuery = true)
    NumSeq findNum();

    @Modifying
    @Query(value = "update num_seq set number = ?1 where id = 1", nativeQuery = true)
    int updateNum(int num);
}
