-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdatedmembers.java
More file actions
106 lines (82 loc) · 2.38 KB
/
Copy pathupdatedmembers.java
File metadata and controls
106 lines (82 loc) · 2.38 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
package com.example.dit.model;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToMany;
import java.util.ArrayList;
import java.util.List;
@XmlRootElement(name = "member")
@Entity
public class Members {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
private String membershipId;
private String name;
private String phoneNumber;
private String address;
private String fitnessGoal;
@ManyToOne
private MembershipPlan membershipPlan;
@OneToMany(mappedBy = "member")
private List<Payment> payments = new ArrayList<>();
public Members() {}
public Members(String membershipId, String name, String phoneNumber, String address, String fitnessGoal) {
this.membershipId = membershipId;
this.name = name;
this.phoneNumber = phoneNumber;
this.address = address;
this.fitnessGoal = fitnessGoal;
}
@XmlElement
public String getMembershipId() {
return membershipId;
}
public void setMembershipId(String membershipId) {
this.membershipId = membershipId;
}
@XmlElement
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@XmlElement
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
@XmlElement
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
@XmlElement
public String getFitnessGoal() {
return fitnessGoal;
}
public void setFitnessGoal(String fitnessGoal) {
this.fitnessGoal = fitnessGoal;
}
public MembershipPlan getMembershipPlan() {
return membershipPlan;
}
public void setMembershipPlan(MembershipPlan membershipPlan) {
this.membershipPlan = membershipPlan;
}
public List<Payment> getPayments() {
return payments;
}
public void setPayments(List<Payment> payments) {
this.payments = payments;
}
}