878a2336479eae2b04fac8942859fba8354577d5
[demos/kafka/demos-kafka-payment-system-transfer] / Transfer.java
1 package de.juplo.kafka.payment.transfer.domain;
2
3
4 import lombok.Builder;
5 import lombok.EqualsAndHashCode;
6 import lombok.Value;
7
8
9 @Value
10 @Builder
11 @EqualsAndHashCode(exclude = "state")
12 public class Transfer
13 {
14   public enum State
15   {
16     SENT,
17     FAILED,
18     PENDING,
19     APPROVED,
20     REJECTED
21   }
22
23   private final long id;
24   private final long payer;
25   private final long payee;
26   private final int amount;
27
28   private State state;
29 }