Subversion Repositories SmartDukaan

Rev

Rev 21759 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
21543 ashik.ali 1
package com.spice.profitmandi.common.model;
2
 
3
import java.time.LocalDateTime;
4
 
5
public class CustomTransaction {
6
	private int id;
7
	private LocalDateTime createTimestamp;
8
	private double totalAmount;
9
	private ShippingAddress shippingAddress;
10
	private float shippingCost;
11
	private ShippedOrder shipped;
12
	private UnshippedOrder unshipped;
13
	public int getId() {
14
		return id;
15
	}
16
	public void setId(int id) {
17
		this.id = id;
18
	}
19
	public LocalDateTime getCreateTimestamp() {
20
		return createTimestamp;
21
	}
22
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
23
		this.createTimestamp = createTimestamp;
24
	}
25
	public double getTotalAmount() {
26
		return totalAmount;
27
	}
28
	public void setTotalAmount(double totalAmount) {
29
		this.totalAmount = totalAmount;
30
	}
31
	public ShippingAddress getShippingAddress() {
32
		return shippingAddress;
33
	}
34
	public void setShippingAddress(ShippingAddress shippingAddress) {
35
		this.shippingAddress = shippingAddress;
36
	}
37
	public float getShippingCost() {
38
		return shippingCost;
39
	}
40
	public void setShippingCost(float shippingCost) {
41
		this.shippingCost = shippingCost;
42
	}
43
	public ShippedOrder getShipped() {
44
		return shipped;
45
	}
46
	public void setShipped(ShippedOrder shipped) {
47
		this.shipped = shipped;
48
	}
49
	public UnshippedOrder getUnshipped() {
50
		return unshipped;
51
	}
52
	public void setUnshipped(UnshippedOrder unshipped) {
53
		this.unshipped = unshipped;
54
	}
55
 
56
	@Override
57
	public boolean equals(Object object) {
58
		if(!(object instanceof CustomTransaction)){
59
			return false;
60
		}
61
		CustomTransaction customTransaction = (CustomTransaction)object;
62
		if(this.id == customTransaction.id){
63
			return true;
64
		}else{
65
			return false;
66
		}
67
	}
68
	@Override
69
	public String toString() {
70
		return "CustomTransaction [id=" + id + ", createTimestamp=" + createTimestamp + ", totalAmount=" + totalAmount
71
				+ ", shippingAddress=" + shippingAddress + ", shippingCost=" + shippingCost + ", shipped=" + shipped
72
				+ ", unshipped=" + unshipped + "]";
73
	}
74
 
75
 
76
 
77
}