Add new entities

This commit is contained in:
mirrerror
2023-09-21 11:33:44 +03:00
parent ccea0d393c
commit 0918a51f7a
9 changed files with 180 additions and 9 deletions

View File

@@ -0,0 +1,41 @@
package entities;
public class Expense extends MoneyTransaction {
private int userId;
private int amount;
private ExpensesCategory category;
public Expense(int userId, int amount, ExpensesCategory category) {
this.userId = userId;
this.amount = amount;
this.category = category;
}
@Override
public long getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
@Override
public int getAmount() {
return amount;
}
public void setAmount(int amount) {
this.amount = amount;
}
@Override
public String getCategory() {
return category.toString();
}
public void setCategory(ExpensesCategory category) {
this.category = category;
}
}