-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from NTOU-Auction/feature/product
將product合併到development
- Loading branch information
Showing
7 changed files
with
206 additions
and
31 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
41 changes: 41 additions & 0 deletions
41
src/main/java/ntou/auction/spring/data/entity/UpdateFixedPriceProductRequest.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,41 @@ | ||
package ntou.auction.spring.data.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Lob; | ||
import jakarta.validation.constraints.Min; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.validator.constraints.Length; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class UpdateFixedPriceProductRequest { | ||
|
||
@NotNull | ||
@Length(min = 1, max = 128 , message = "商品名稱至多32個中文字") | ||
private String productName; | ||
|
||
@NotNull | ||
@Min (value = 1,message = "價格須為正整數") | ||
private Long currentPrice; | ||
|
||
|
||
@Length(min = 1, max = 32) | ||
private String productType; | ||
|
||
@Length(min = 1, max = 20971520,message = "商品敘述過長") | ||
private String productDescription; | ||
|
||
@Lob | ||
@Column(length = 5242880) | ||
@Length(min = 1, max = 5242880 ,message = "圖片檔案過大,請重新上傳") | ||
private String productImage; | ||
|
||
@NotNull | ||
@Min (value = 1,message = "商品至少一個") | ||
private Long productAmount; | ||
|
||
} |
48 changes: 48 additions & 0 deletions
48
src/main/java/ntou/auction/spring/data/entity/UpdateNonFixedPriceProductRequest.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,48 @@ | ||
package ntou.auction.spring.data.entity; | ||
|
||
import jakarta.persistence.Column; | ||
import jakarta.persistence.Lob; | ||
import jakarta.validation.constraints.Min; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.validator.constraints.Length; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class UpdateNonFixedPriceProductRequest { | ||
|
||
@NotNull (message="商品名稱不得為空") | ||
@Length(min = 1, max = 128 , message = "商品名稱至多32個中文字") | ||
private String productName; | ||
|
||
@NotNull | ||
@Min (value = 1,message = "價格須為正整數") | ||
private Long upsetPrice; //lowest requested price | ||
|
||
@NotNull | ||
@Min (value = 1,message = "每口叫價須為正整數") | ||
private Long bidIncrement; | ||
|
||
@NotNull (message="商品數量不得為空") | ||
private Long productAmount; | ||
|
||
@NotNull | ||
private String finishTime; | ||
|
||
@Length(min = 1, max = 32) | ||
private String productType; | ||
|
||
@Length(min = 1, max = 20971520,message = "商品敘述過長") | ||
private String productDescription; | ||
|
||
@Lob | ||
@Column(length = 5242880) | ||
@Length(min = 1, max = 5242880 ,message = "圖片檔案過大,請重新上傳") | ||
private String productImage; | ||
|
||
|
||
|
||
} |
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