Skip to content

Commit

Permalink
요구사항 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kiteB committed Sep 21, 2021
1 parent 0e7c23f commit e0e7e9a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
16 changes: 16 additions & 0 deletions form/src/main/java/hello/itemservice/domain/item/DeliveryCode.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package hello.itemservice.domain.item;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
* FAST: 빠른 배송
* NORMAL: 일반 배송
* SLOW: 느린 배송
*/
@Data
@AllArgsConstructor
public class DeliveryCode {
private String code;
private String displayName;
}
7 changes: 7 additions & 0 deletions form/src/main/java/hello/itemservice/domain/item/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import lombok.Data;

import java.util.List;

@Data
public class Item {

Expand All @@ -10,6 +12,11 @@ public class Item {
private Integer price;
private Integer quantity;

private Boolean open; //판매여부
private List<String> regions; //등록 지역
private ItemType itemType; //상품 종류
private String deliveryCode; //배송 방식

public Item() {
}

Expand Down
14 changes: 14 additions & 0 deletions form/src/main/java/hello/itemservice/domain/item/ItemType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package hello.itemservice.domain.item;

public enum ItemType {

BOOK("도서"), FOOD("음식"), ETC("기타");

private final String description;
ItemType(String description) {
this.description = description;
}
public String getDescription() {
return description;
}
}

0 comments on commit e0e7e9a

Please sign in to comment.