Skip to content

Commit

Permalink
feat: add delete column
Browse files Browse the repository at this point in the history
  • Loading branch information
myeongju-kim committed Nov 16, 2022
1 parent b3e0e65 commit e533b66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions sparky/src/main/java/com/cmc/sparky/scrap/domain/Tag.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ public class Tag {
@ManyToOne
@JoinColumn(name="userId")
private User user;
private Boolean isDeleted=false;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@Repository
public interface TagRepository extends JpaRepository<Tag, Long> {
Tag findByNameAndUser(String name, User user);
List<Tag> findAllByUserOrderByIdDesc(User user);
List<Tag> findAllByUserAndIsDeletedOrderByIdDesc(User user, Boolean isDeleted);
@Query(value="select t.name from Tag t where t.user=:user")
List<String> findNameByUser(User user);
List<Tag> findAllByUser(User user);
Expand Down

0 comments on commit e533b66

Please sign in to comment.