Changed folder structure
This commit is contained in:
43
src/main/java/com/faf223/expensetrackerfaf/model/Income.java
Normal file
43
src/main/java/com/faf223/expensetrackerfaf/model/Income.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package com.faf223.expensetrackerfaf.model;
|
||||
|
||||
import com.faf223.expensetrackerfaf.util.IMoneyTransaction;
|
||||
|
||||
public class Income implements IMoneyTransaction {
|
||||
|
||||
private long userId;
|
||||
private int amount;
|
||||
private Categories.IncomeCategory category;
|
||||
|
||||
public Income(long userId, int amount, Categories.IncomeCategory category) {
|
||||
this.userId = userId;
|
||||
this.amount = amount;
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCategory() {
|
||||
return category.getEffectiveName();
|
||||
}
|
||||
|
||||
public void setUserId(long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public void setAmount(int amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public void setCategory(Categories.IncomeCategory category) {
|
||||
this.category = category;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user