package it.polito.mad.countonme.models;

import java.util.Date;
import java.util.List;

/**
 * The expense data model
 * Created by francescobruno on 03/04/17.
 */

public class Expense {
    private String mKey;
    private String mName;
    private String mDescription;
    private String mSharingActivityCurrency;
    private String mExpenseCurrency;
    private Double mAmount;
    private Double mConvertedAmount;
    private String mImageUrl;
    private String mParentSharingActivityId;
    private Boolean mIsSurvey;
    private Date mDate;
    private User mPayer;
    private List<User> mInvolved;

    public Expense() {
        this( null, null, null, null, 0.0, 0.0, null, null, null, null, false );
    }


    public Expense(String mName, String mDescription, String mSharingActivityCurrency, String mExpenseCurrency,
                   Double mAmount, Double mConvertedAmount, String mImageUrl, String mParentSharingActivityId, Date date, User payer, Boolean mIsSurvey) {
        this.mName = mName;
        this.mDescription = mDescription;
        this.mSharingActivityCurrency = mSharingActivityCurrency;
        this.mExpenseCurrency = mExpenseCurrency;
        this.mAmount = mAmount;
        this.mConvertedAmount = mConvertedAmount;
        this.mImageUrl = mImageUrl;
        this.mParentSharingActivityId = mParentSharingActivityId;
        this.mDate = date;
        this.mIsSurvey = mIsSurvey;
    }

    public String getKey() {
        return mKey;
    }

    public void setKey( String key ) {
        mKey = key;
    }

    public String getName() {
        return mName;
    }

    public void setName(String mName) {
        this.mName = mName;
    }

    public String getDescription() {
        return mDescription;
    }

    public void setDescription(String mDescription) {
        this.mDescription = mDescription;
    }

    public String getSharingActivityCurrency() {
        return mSharingActivityCurrency;
    }

    public void setSharingActivityCurrency(String mSharingActivityCurrency) {
        this.mSharingActivityCurrency = mSharingActivityCurrency;
    }

    public String getExpenseCurrency() {
        return mExpenseCurrency;
    }

    public void setExpenseCurrency( String mExpenseCurrency ) {
        this.mExpenseCurrency = mExpenseCurrency;
    }

    public Double getAmount() {
        return mAmount;
    }

    public void setAmount(Double mAmount) {
        this.mAmount = mAmount;
    }

    public Double getConvertedAmount() {
        return mConvertedAmount;
    }

    public void setConvertedAmount(Double mConvertedAmount) {
        this.mConvertedAmount = mConvertedAmount;
    }

    public String getImageUrl() {
        return mImageUrl;
    }

    public void setImageUrl(String mImageUrl) {
        this.mImageUrl = mImageUrl;
    }

    public Date getDate() { return mDate; }

    public void setDate( Date date ) { mDate = date; }

    public User getPayer() { return mPayer; }

    public void setPayer( User payer ) { mPayer = payer; }

    public List<User> getInvolved() { return mInvolved; }

    public void setInvolved( List<User> Involved ) { mInvolved = Involved; }

    public Boolean getIsSurvey() {
        return mIsSurvey;
    }

    public void setIsSurvey(Boolean mIsSurvey) {
        this.mIsSurvey = mIsSurvey;
    }

    public String getParentSharingActivityId() {
        return mParentSharingActivityId;
    }

    public void setParentSharingActivityId(String mParentSharingActivityId) {
        this.mParentSharingActivityId = mParentSharingActivityId;
    }
}


@@ -534,78 +534,221 @@
 ate 
-Date mDate;%0A    private User mPayer;%0A    private List%3CUser%3E mInvolved;
+Boolean mIsMoneyTransfer;%0A    private String mSubmitterId;%0A    private Date mDate;%0A    private User mPayer;%0A    private List%3CUser%3E mInvolved; // TODO must be changed we need a new model for saving this information
 %0A%0A  
@@ -3392,34 +3392,33 @@
 sSurvey(Boolean 
-mI
+i
 sSurvey) %7B%0A     
@@ -3412,37 +3412,32 @@
 rvey) %7B%0A        
-this.
 mIsSurvey = mIsS
@@ -3424,34 +3424,33 @@
     mIsSurvey = 
-mI
+i
 sSurvey;%0A    %7D%0A%0A
@@ -3441,32 +3441,351 @@
 sSurvey;%0A    %7D%0A%0A
+    public Boolean getIsMoneyTransfer(  ) %7B return mIsMoneyTransfer; %7D%0A%0A    public void setIsMoneyTransfer(Boolean isMoneyTransfer) %7B mIsMoneyTransfer = isMoneyTransfer; %7D%0A%0A    public String getSubmitterId() %7B return mSubmitterId; %7D%0A%0A    public void setSubmitterId( String submitterId) %7B mSubmitterId = submitterId; %7D%0A%0A
     public Strin

add information in the expense model