Subversion Repositories SmartDukaan

Rev

Rev 28514 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.dao.model;

import java.time.LocalDateTime;

import in.shop2020.model.v1.order.WalletReferenceType;

public class AccountStatementModel {
        private WalletReferenceType walletReferenceType;
        private long credit;
        private long debit;
        private LocalDateTime date;
        
        public LocalDateTime getDate() {
                return date;
        }
        public void setDate(LocalDateTime date) {
                this.date = date;
        }
        public AccountStatementModel(WalletReferenceType walletReferenceType, long credit, long debit) {
                super();
                this.walletReferenceType = walletReferenceType;
                this.date = date;
                this.credit = credit;
                this.debit = debit;
        }
        @Override
        public String toString() {
                return "AccountStatementModel [walletReferenceType=" + walletReferenceType + ", credit=" + credit + ", debit="
                                + debit + ", date=" + date + "]";
        }
        public WalletReferenceType getWalletReferenceType() {
                return walletReferenceType;
        }
        public void setWalletReferenceType(WalletReferenceType walletReferenceType) {
                this.walletReferenceType = walletReferenceType;
        }
        public long getCredit() {
                return credit;
        }
        public void setCredit(long credit) {
                this.credit = credit;
        }
        public long getDebit() {
                return debit;
        }
        public void setDebit(long debit) {
                this.debit = debit;
        }
        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + (int) (credit ^ (credit >>> 32));
                result = prime * result + ((date == null) ? 0 : date.hashCode());
                result = prime * result + (int) (debit ^ (debit >>> 32));
                result = prime * result + ((walletReferenceType == null) ? 0 : walletReferenceType.hashCode());
                return result;
        }
        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                AccountStatementModel other = (AccountStatementModel) obj;
                if (credit != other.credit)
                        return false;
                if (date == null) {
                        if (other.date != null)
                                return false;
                } else if (!date.equals(other.date))
                        return false;
                if (debit != other.debit)
                        return false;
                if (walletReferenceType != other.walletReferenceType)
                        return false;
                return true;
        }
        
}