Skip to content

Commit

Permalink
#82 fix : 프로젝트 순열 seq 추가 / @id id -> seq
Browse files Browse the repository at this point in the history
  • Loading branch information
rivkode committed Apr 26, 2024
1 parent 6a81934 commit bd0eb89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@
@Where(clause = "is_deleted = false")
@SQLDelete(sql = "UPDATE post SET is_deleted = true WHERE project_id = ?")
public class Project extends BaseTime {
@Id
@Column(name = "project_id")
private String id;

@Id
@Column(name = "project_sequence")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long seq;

@Embedded
private ProjectName name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

@Repository
public interface ProjectRepository extends JpaRepository<Project, String> {
@Query(value = "SELECT * FROM project WHERE project_id < :projectId ORDER BY project_id DESC LIMIT 10", nativeQuery = true)
List<Project> findAllByEndId(@Param("projectId") Long projectId);
@Query(value = "SELECT * FROM project WHERE project_sequence < :projectSequence ORDER BY project_sequence DESC LIMIT 10", nativeQuery = true)
List<Project> findAllByEndSequence(@Param("projectSequence") Long projectSequence);

Page<Project> findAll(Specification<Project> spec, Pageable pageable);

Expand Down

0 comments on commit bd0eb89

Please sign in to comment.