89 lines
1.9 KiB
Java
89 lines
1.9 KiB
Java
package com.example.template;
|
|
|
|
import java.io.Serializable;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.Date;
|
|
|
|
public class OrderPlaced extends AbstractEvent{
|
|
|
|
private String stateMessage = "주문이 발생함";
|
|
|
|
private Long productId;
|
|
private Long orderId;
|
|
private String productName;
|
|
private int quantity;
|
|
private int price;
|
|
private String customerName;
|
|
private String customerAddr;
|
|
|
|
public OrderPlaced(){
|
|
this.setEventType(this.getClass().getSimpleName());
|
|
SimpleDateFormat defaultSimpleDateFormat = new SimpleDateFormat("YYYYMMddHHmmss");
|
|
this.timestamp = defaultSimpleDateFormat.format(new Date());
|
|
}
|
|
|
|
public String getStateMessage() {
|
|
return stateMessage;
|
|
}
|
|
|
|
public void setStateMessage(String stateMessage) {
|
|
this.stateMessage = stateMessage;
|
|
}
|
|
|
|
public Long getProductId() {
|
|
return productId;
|
|
}
|
|
|
|
public void setProductId(Long productId) {
|
|
this.productId = productId;
|
|
}
|
|
|
|
public Long getOrderId() {
|
|
return orderId;
|
|
}
|
|
|
|
public void setOrderId(Long orderId) {
|
|
this.orderId = orderId;
|
|
}
|
|
|
|
public String getProductName() {
|
|
return productName;
|
|
}
|
|
|
|
public void setProductName(String productName) {
|
|
this.productName = productName;
|
|
}
|
|
|
|
public int getQuantity() {
|
|
return quantity;
|
|
}
|
|
|
|
public void setQuantity(int quantity) {
|
|
this.quantity = quantity;
|
|
}
|
|
|
|
public int getPrice() {
|
|
return price;
|
|
}
|
|
|
|
public void setPrice(int price) {
|
|
this.price = price;
|
|
}
|
|
|
|
public String getCustomerName() {
|
|
return customerName;
|
|
}
|
|
|
|
public void setCustomerName(String customerName) {
|
|
this.customerName = customerName;
|
|
}
|
|
|
|
public String getCustomerAddr() {
|
|
return customerAddr;
|
|
}
|
|
|
|
public void setCustomerAddr(String customerAddr) {
|
|
this.customerAddr = customerAddr;
|
|
}
|
|
}
|