-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[FEAT] 업무 카드 저장 시, 번호스티커도 같이 저장
- Loading branch information
Showing
10 changed files
with
102 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/main/java/site/katchup/katchupserver/api/sticker/domain/Sticker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package site.katchup.katchupserver.api.sticker.domain; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import site.katchup.katchupserver.api.screenshot.domain.Screenshot; | ||
import site.katchup.katchupserver.common.domain.BaseEntity; | ||
|
||
import static jakarta.persistence.FetchType.LAZY; | ||
import static jakarta.persistence.GenerationType.IDENTITY; | ||
import static lombok.AccessLevel.PROTECTED; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = PROTECTED) | ||
public class Sticker extends BaseEntity { | ||
@Id | ||
@GeneratedValue(strategy = IDENTITY) | ||
private Long id; | ||
|
||
@Column(name = "sticker_order") | ||
private Integer order; | ||
|
||
@Column(name = "x_coordinate") | ||
private Float x; | ||
|
||
@Column(name = "y_coordinate") | ||
private Float y; | ||
|
||
@ManyToOne(fetch = LAZY) | ||
@JoinColumn(name = "screenshot_id") | ||
private Screenshot screenshot; | ||
|
||
@Builder | ||
public Sticker(Integer order, Float x, Float y, Screenshot screenshot) { | ||
this.order = order; | ||
this.x = x; | ||
this.y = y; | ||
this.screenshot = screenshot; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/site/katchup/katchupserver/api/sticker/dto/StickerCreateRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package site.katchup.katchupserver.api.sticker.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.persistence.Column; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
@Schema(description = "번호 스티커 추가 요청 DTO") | ||
public class StickerCreateRequestDto { | ||
@Schema(description = "스티커 번호", example = "2") | ||
private Integer order; | ||
|
||
@Schema(description = "스티커 X좌표", example = "300") | ||
private Float x; | ||
|
||
@Schema(description = "스티커 Y좌표", example = "400") | ||
private Float y; | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/site/katchup/katchupserver/api/sticker/repository/StickerRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package site.katchup.katchupserver.api.sticker.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import site.katchup.katchupserver.api.sticker.domain.Sticker; | ||
|
||
public interface StickerRepository extends JpaRepository<Sticker, Long> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters