diff --git a/src/main/java/com/wellsfargo/counselor/entity/Client.java b/src/main/java/com/wellsfargo/counselor/entity/Client.java new file mode 100644 index 00000000..dec110f3 --- /dev/null +++ b/src/main/java/com/wellsfargo/counselor/entity/Client.java @@ -0,0 +1,75 @@ +package com.wellsfargo.counselor.entity; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; + +@Entity +public class Client { + @Id + @GeneratedValue() + private long client_id; + + @Column(nullable = false) + private long advisor_id; + + @Column(nullable = false) + private String name; + + @Column(nullable = false) + private String contact_info; + + @Column(nullable = false) + private long portfolio_id; + + public Client(){ + + } + + public Client(int client_id, int advisor_id, String name, String contact_info, int portfolio_id) { + this.client_id = client_id; + this.advisor_id = advisor_id; + this.name = name; + this.contact_info = contact_info; + this.portfolio_id = portfolio_id; + } + + public long getClient_id() { + return client_id; + } + + public long getAdvisor_id() { + return advisor_id; + } + + public void setAdvisor_id(int advisor_id) { + this.advisor_id = advisor_id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getContact_info() { + return contact_info; + } + + public void setContact_info(String contact_info) { + this.contact_info = contact_info; + } + + public long getPortfolio_id() { + return portfolio_id; + } + + public void setPortfolio_id(int portfolio_id) { + this.portfolio_id = portfolio_id; + } + + +} diff --git a/src/main/java/com/wellsfargo/counselor/entity/Portfolio.java b/src/main/java/com/wellsfargo/counselor/entity/Portfolio.java new file mode 100644 index 00000000..cd3f0a2b --- /dev/null +++ b/src/main/java/com/wellsfargo/counselor/entity/Portfolio.java @@ -0,0 +1,36 @@ +package com.wellsfargo.counselor.entity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; + +@Entity +public class Portfolio { + + @Id + @GeneratedValue() + private long portfolio_id; + + @Column(nullable = false) + private long client_id; + + public Portfolio(long portfolio_id, long client_id) { + this.portfolio_id = portfolio_id; + this.client_id = client_id; + } + + public long getPortfolio_id() { + return portfolio_id; + } + + public long getClient_id() { + return client_id; + } + + public void setClient_id(long client_id) { + this.client_id = client_id; + } + + + +} diff --git a/src/main/java/com/wellsfargo/counselor/entity/Security.java b/src/main/java/com/wellsfargo/counselor/entity/Security.java new file mode 100644 index 00000000..2b863a21 --- /dev/null +++ b/src/main/java/com/wellsfargo/counselor/entity/Security.java @@ -0,0 +1,59 @@ +package com.wellsfargo.counselor.entity; + +import com.sun.javafx.beans.IDProperty; + +@Entity +public class Security { + + @ID + @GeneratedValue() + private long security_id; + + @Column(nullable = false) + private long portfolio_id; + + @Column(nullable = false) + private String name; + + @Column(nullable = false) + private int quantity; + + public Security(long security_id, long portfolio_id, String name, int quantity) { + this.security_id = security_id; + this.portfolio_id = portfolio_id; + this.name = name; + this.quantity = quantity; + } + + + public long getSecurity_id() { + return security_id; + } + + public long getPortfolio_id() { + return portfolio_id; + } + + public void setPortfolio_id(long portfolio_id) { + this.portfolio_id = portfolio_id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getQuantity() { + return quantity; + } + + public void setQuantity(int quantity) { + this.quantity = quantity; + } + + + +}