Last active
August 18, 2017 15:53
-
-
Save alxlion/6e0d976cb00e459e18efbb178acb50ef to your computer and use it in GitHub Desktop.
Transaction entity
This file contains hidden or 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
public class Transaction { | |
private UUID id; | |
private float amount; | |
private Date date; | |
public Transaction(float amount) { | |
this.amount = amount; | |
this.date = new Date(); | |
this.id = UUID.randomUUID(); | |
} | |
public UUID getId() { | |
return id; | |
} | |
public float getAmount() { | |
return amount; | |
} | |
public Date getDate() { | |
return date; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment