-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreditCard.java
More file actions
48 lines (38 loc) · 885 Bytes
/
CreditCard.java
File metadata and controls
48 lines (38 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.getdata.restcall_test1.Entity;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.sql.Date;
@Entity
@Table(name = "CreditCards")
@NoArgsConstructor
@AllArgsConstructor
public class CreditCard {
@Getter
@Setter
@Id
@Column(name = "CardNum")
private String CardNum;
@Getter
@Setter
@Column(name = "CVV")
private int CVV;
@Getter
@Setter
@Column(name = "ExpDate")
private Date ExpDate;
@Getter
@Setter
@Column
private String UserID;
@Getter
@Setter
@JsonIgnore
@ManyToOne
@JoinColumn(name = "UserID", insertable = false, updatable = false)
private User user;
}