Skip to content

4. Base Domains Microservice Create DTO Classes Order and OrderEvent

Ramesh Fadatare edited this page Jul 11, 2022 · 1 revision

Order

package net.javaguides.basedomains.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Order {
    private String orderId;
    private String name;
    private int qty;
    private double price;
}

OrderEvent

package net.javaguides.basedomains.dto;//package net.javaguides.orderservice.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderEvent {
    private String status; // pending, progress, completed
    private String message;
    private Order order;
}