Subversion Repositories SmartDukaan

Rev

Rev 22653 | Rev 25545 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22653 Rev 25544
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.transaction;
1
package com.spice.profitmandi.dao.entity.transaction;
2
 
2
 
-
 
3
import java.time.LocalDateTime;
-
 
4
 
3
import javax.persistence.Column;
5
import javax.persistence.Column;
4
import javax.persistence.Entity;
6
import javax.persistence.Entity;
5
import javax.persistence.GeneratedValue;
7
import javax.persistence.GeneratedValue;
6
import javax.persistence.GenerationType;
8
import javax.persistence.GenerationType;
7
import javax.persistence.Id;
9
import javax.persistence.Id;
8
import javax.persistence.Table;
10
import javax.persistence.Table;
9
 
11
 
-
 
12
import org.springframework.beans.factory.annotation.Autowired;
-
 
13
 
-
 
14
import com.spice.profitmandi.dao.repository.transaction.UserWalletHistoryRepository;
-
 
15
 
10
@Entity
16
@Entity
11
@Table(name="transaction.userwallet",schema="transaction")
17
@Table(name="transaction.userwallet",schema="transaction")
12
public class UserWallet{
18
public class UserWallet{
13
	
19
	
-
 
20
	@Autowired UserWalletHistoryRepository userWalletHistoryRepository;
-
 
21
	
14
	@Id
22
	@Id
15
	@GeneratedValue(strategy=GenerationType.IDENTITY)
23
	@GeneratedValue(strategy=GenerationType.IDENTITY)
16
	private int id;
24
	private int id;
17
	private int userId;
25
	private int userId;
18
	private int amount;
26
	private int amount;
Line 31... Line 39...
31
	}
39
	}
32
	public void setUserId(int userId) {
40
	public void setUserId(int userId) {
33
		this.userId = userId;
41
		this.userId = userId;
34
	}
42
	}
35
	public int getAmount() {
43
	public int getAmount() {
36
		return amount;
44
		return (int)userWalletHistoryRepository.selectSumByWallet(this.id);
37
	}
45
	}
38
	public void setAmount(int amount) {
46
	public void setAmount(int amount) {
39
		this.amount = amount;
47
		this.amount = amount;
40
	}
48
	}
41
	public int getRefundableAmount() {
49
	public int getRefundableAmount() {