-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor, feat : 컬럼 추가, 타입변경 및 rename 에 따른 기능 수정 (#38)
- Loading branch information
1 parent
ede67b3
commit 3c71800
Showing
7 changed files
with
60 additions
and
45 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
39 changes: 31 additions & 8 deletions
39
Domain/src/main/java/picasso/server/domain/domains/items/Picture.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 |
---|---|---|
@@ -1,36 +1,59 @@ | ||
package picasso.server.domain.domains.items; | ||
|
||
import jakarta.persistence.*; | ||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.EnumType; | ||
import jakarta.persistence.Enumerated; | ||
import jakarta.persistence.GeneratedValue; | ||
import jakarta.persistence.GenerationType; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Lob; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
import java.time.LocalDateTime; | ||
import java.time.LocalDate; | ||
|
||
@Getter | ||
@Setter | ||
@Entity | ||
@Getter @Setter | ||
@NoArgsConstructor | ||
public class Picture { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long picture_id; | ||
|
||
@NotNull | ||
private String imgUrl; //그림 url | ||
|
||
@NotNull | ||
private String pictureName; //그림 이름 | ||
|
||
@NotNull | ||
private String painterName; //화가 이름 | ||
|
||
@Column(nullable = false) | ||
@Lob | ||
private String details; //그림 설명 | ||
|
||
|
||
//기본 값을 BEFORE_APPROVE로 사용 | ||
@NotNull | ||
@Enumerated(EnumType.STRING) | ||
private PictureStatus pictureStatus; | ||
private PictureStatus pictureStatus = PictureStatus.BEFORE_APPROVE; | ||
|
||
private int startingPrice; //시작 가격 | ||
//시작 가격, 기본 최소 가격 0원 | ||
private int startingPrice = 0; | ||
|
||
private int incrementAmount; //최소 입찰 단위 | ||
//최소 입찰 단위, 기본 최소값 500 원 | ||
private int incrementAmount = 500; | ||
|
||
private String size; //그림 사이즈 | ||
private LocalDateTime dateTime; | ||
|
||
@NotNull // 경매 시작일, 기본 값은 Now(); 를 사용한다. | ||
private LocalDate bidStartDate = LocalDate.now(); | ||
|
||
@NotNull | ||
private LocalDate bidEndDate; // 경매 종료일 | ||
|
||
} |
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