-
Notifications
You must be signed in to change notification settings - Fork 3
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 #139 from in27sung/hyeon
쌈뽕한 주문
- Loading branch information
Showing
15 changed files
with
2,169 additions
and
509 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
package com.stockm8.domain.vo; | ||
|
||
import java.sql.Timestamp; | ||
import java.util.List; | ||
|
||
import lombok.Data; | ||
|
||
|
||
@Data | ||
public class OrderVO { | ||
|
||
private int orderId; // 주문 고유 ID | ||
private String orderNumber; // 주문 번호 | ||
private int warehouseId; // 주문 대상 창고 | ||
private int orderId; // 주문 고유 ID | ||
private String orderNumber; // 주문 번호 (예: ORD-YYYYMMDD-001) | ||
private double totalPrice; // 주문 전체 총 금액 | ||
private int createdBy; // 주문을 생성한 사용자 ID | ||
private Timestamp createdAt; // 주문 생성 날짜 | ||
private Timestamp updatedAt; // 주문 수정 날짜 | ||
private String status; // 주문 상태 (pending, confirmed, cancelled) | ||
|
||
|
||
|
||
private List<OrderItemVO> orderItems; // 주문 항목 리스트 | ||
|
||
|
||
|
||
}// OrderVO |
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
58 changes: 58 additions & 0 deletions
58
stockMate/src/main/java/com/stockm8/domain/vo/StockVO2.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,58 @@ | ||
package com.stockm8.domain.vo; | ||
|
||
import java.sql.Timestamp; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class StockVO2 { | ||
private int stockId; // 고유 재고 ID | ||
private int productId; // 상품 ID | ||
private int warehouseId; // 창고 ID | ||
private int businessId; // 사업자 ID | ||
|
||
private int totalQuantity; // 창고 내 총 재고 수량 | ||
private int reservedQuantity; // 예약된 수량 | ||
|
||
// availableStock은 totalQuantity - reservedQuantity로 계산 | ||
private int availableStock; // 사용 가능한 재고 (totalQuantity - reservedQuantity) | ||
|
||
// totalQuantity에 대한 getter | ||
public int getTotalQuantity() { | ||
return totalQuantity; | ||
} | ||
|
||
public void setTotalQuantity(int totalQuantity) { | ||
this.totalQuantity = totalQuantity; | ||
updateAvailableStock(); // 값이 변경되면 availableStock을 자동으로 업데이트 | ||
} | ||
|
||
// reservedQuantity에 대한 getter | ||
public int getReservedQuantity() { | ||
return reservedQuantity; | ||
} | ||
|
||
public void setReservedQuantity(int reservedQuantity) { | ||
this.reservedQuantity = reservedQuantity; | ||
updateAvailableStock(); // 값이 변경되면 availableStock을 자동으로 업데이트 | ||
} | ||
|
||
// availableStock을 계산하는 getter | ||
public int getAvailableStock() { | ||
return availableStock; | ||
} | ||
|
||
// availableStock 계산 | ||
private void updateAvailableStock() { | ||
this.availableStock = this.totalQuantity - this.reservedQuantity; | ||
} | ||
|
||
private Timestamp createdAt; // 재고 등록 시간 | ||
private Timestamp updatedAt; // 최근 수정 시간 | ||
|
||
private String description; // 재고 설명 | ||
|
||
private String dscription; // 재고 설명 | ||
private Boolean isDeleted; // 논리 삭제 여부 (true: 삭제됨, false: 활성) | ||
|
||
} |
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
Oops, something went wrong.