Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delivery of task 2 #75

Open
wants to merge 2 commits into
base: flow
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 14 additions & 58 deletions src/main/java/com/wellsfargo/counselor/entity/Advisor.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,80 +7,36 @@
import jakarta.persistence.Id;

@Entity
public class Advisor {
public class Advisors {

@Id
@GeneratedValue()
private long advisorId;
private long advisor_id;

@Column(nullable = false)
private String firstName;
private String username;

@Column(nullable = false)
private String lastName;
private String created_at;

@Column(nullable = false)
private String address;

@Column(nullable = false)
private String phone;

@Column(nullable = false)
private String email;

protected Advisor() {

}

public Advisor(String firstName, String lastName, String address, String phone, String email) {
this.firstName = firstName;
this.lastName = lastName;
this.address = address;
this.phone = phone;
this.email = email;
}

public Long getAdvisorId() {
return advisorId;
}

public String getFirstName() {
return firstName;
}

public void setFirstName(String firstName) {
this.firstName = firstName;
}

public String getLastName() {
return lastName;
}

public void setLastName(String lastName) {
this.lastName = lastName;
}

public String getAddress() {
return address;
}
protected Advisors() {

public void setAddress(String address) {
this.address = address;
}

public String getPhone() {
return phone;
public Advisors(String username, String created_at) {
this.username = username;
this.created_at = created_at;
}

public void setPhone(String phone) {
this.phone = phone;
public Long getAdvisor_id() {
return advisor_id;
}

public String getEmail() {
return email;
public String getUsername() {
return username;
}

public void setEmail(String email) {
this.email = email;
public void getCreated_at() {
return created_at;
}
}
106 changes: 106 additions & 0 deletions src/main/java/com/wellsfargo/counselor/entity/Clients.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
package com.wellsfargo.counselor.entity;

import jakarta.persistence.*;

@Entity
public class Clients {

@Id
@GeneratedValue()
private long client_id;

@Column(nullable = false)
private String username;

@Column(nullable = false)
private String firstName;

@Column(nullable = false)
private String lastName;

@Column(nullable = false)
private String email;

@Column(nullable = false)
private String phone;

@Column(nullable = false)
private String type;

@Column(nullable = false)
private long advisor_id;

@Column(nullable = false)
private String created_at;

protected Clients() {

}

public Clients(String username, String firstName, String lastName, String email, String phone, String type, String advisor_id, String created_at) {
this.username = username;
this.firstName = firstName;
this.lastName = lastName;
this.email = email;
this.phone = phone;
this.type = type;
this.advisor_id = advisor_id;
this.created_at = created_at;
}

public long getClient_id() {
return client_id;
}

public String getUsername() {
return username;
}

public String getFirstName() {
return firstName;
}

public void setFirstName(String firstName) {
this.firstName = firstName;
}

public String getLastName() {
return LastName;
}

public void setLastName(String lastName) {
this.lastName = lastName;
}

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public String getPhone() {
return phone;
}

public void setPhone(String phone) {
this.phone = phone;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public String getAdvisor_id() {
return advisor_id;
}

public String getCreated_at() {
return created_at;
}
}
38 changes: 38 additions & 0 deletions src/main/java/com/wellsfargo/counselor/entity/Portfolio.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.wellsfargo.counselor.entity;

import jakarta.persistence.*;

@Entity
public class Portfolio {

@Id
@GeneratedValue()
private long portfolio_id;

@Column(nullable = false)
private long client_id;

@Column(nullable = false)
private String created_at;

protected Portfolio() {

}

public Portfolio(String client_id, String created_at) {
this.client_id = client_id;
this.created_at = created_at;
}

public long getPortfolio_id() {
return portfolio_id;
}

public long getClient_id() {
return client_id;
}

public void getCreated_at() {
return created_at;
}
}
134 changes: 134 additions & 0 deletions src/main/java/com/wellsfargo/counselor/entity/Securities.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
package com.wellsfargo.counselor.entity;

import jakarta.persistence.*;

@Entity
public class Securities {

@Id
@GeneratedValue()
private long security_id;

@Column(nullable = false)
private String title;

@Column(nullable = false)
private String body;

@Column(nullable = false)
private long portfolio_id;

@Column(nullable = false)
private String status;

@Column(nullable = false)
private String name;

@Column(nullable = false)
private String category;

@Column(nullable = false)
private float purchase_price;

@Column(nullable = false)
private date purchase_date;

@Column(nullable = false)
private double quantity;

@Column(nullable = false)
private String created_at;

protected Securities() {

}

public Securities(String title, String body, long portfolio_id, String status, String name, String category, float purchase_price, date purchase_date, double quantity, String created_at) {
this.title = title;
this.body = body;
this.portfolio_id = portfolio_id;
this.status = status;
this.name = name;
this.category = category;
this.purchase_price = purchase_price;
this.purchase_date = purchase_date;
this.quantity = quantity;
this.created_at = created_at;
}

public long getSecurity_id() {
return security_id;
}

public String getTitle() {
return username;
}

public void setTitle(String title) {
this.title = title;
}

public String getBody() {
return body;
}

public void setBody(String body) {
this.body = body;
}

public long getPortfolio_id() {
return portfolio_id;
}

public String getStatus() {
return status;
}

public void setStatus(String status) {
this.status = status;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getCategory() {
return category;
}

public void setCategory(String category) {
this.category = category;
}

public float getPurchasePrice() {
return purchase_price;
}

public void setPurchasePrice(float purchase_price) {
this.purchase_price = purchase_price;
}

public String getPurchaseDate() {
return purchase_date;
}

public void setPurchaseDate(float purchase_date) {
this.purchase_date = purchase_date;
}

public double getQuantity() {
return quantity;
}

public void setQuantity(double quantity) {
this.quantity = quantity;
}

public void getCreated_at() {
return created_at;
}
}