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

data model task #83

Open
wants to merge 1 commit 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
91 changes: 91 additions & 0 deletions src/main/java/com/wellsfargo/counselor/entity/Client.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
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 Integer clientId;

@Column(nullable = false)
private String firstName;

@Column(nullable = false)
private String lastName;

@Column(nullable = false)
private String address;

@Column(nullable = false)
private String phone;

@Column(nullable = false)
private String email;

public Client() {

}

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

public Integer getClientId() {
return clientId;
}

public void setClientId(Integer clientId) {
this.clientId = clientId;
}

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;
}

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

public String getPhone() {
return phone;
}

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

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}
}
42 changes: 42 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,42 @@
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 portfolioId;

@Column(nullable = false)
private String creationDate;

public Portfolio() {

}

public Portfolio(Long portfolioId, String creationDate) {
this.portfolioId = portfolioId;
this.creationDate = creationDate;
}

public Long getPortfolioId() {
return portfolioId;
}

public void setPortfolioId(Long portfolioId) {
this.portfolioId = portfolioId;
}

public String getCreationDate() {
return creationDate;
}

public void setCreationDate(String creationDate) {
this.creationDate = creationDate;
}
}
90 changes: 90 additions & 0 deletions src/main/java/com/wellsfargo/counselor/entity/Security.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
package com.wellsfargo.counselor.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;

@Entity
public class Security {

@Id
@GeneratedValue
private Long SecurityId;

@Column
private String securityName;

@Column(nullable = false)
private String category;

@Column(nullable = false)
private String purchaseDate;

@Column(nullable = false)
private double purchasePrice;

@Column(nullable = false)
private int quantity;

public Security() {

}

public Security(Long securityId, String securityName, String category, String purchaseDate, double purchasePrice, int quantity) {
SecurityId = securityId;
this.securityName = securityName;
this.category = category;
this.purchaseDate = purchaseDate;
this.purchasePrice = purchasePrice;
this.quantity = quantity;
}

public Long getSecurityId() {
return SecurityId;
}

public void setSecurityId(Long securityId) {
SecurityId = securityId;
}

public String getSecurityName() {
return securityName;
}

public void setSecurityName(String securityName) {
this.securityName = securityName;
}

public String getCategory() {
return category;
}

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

public String getPurchaseDate() {
return purchaseDate;
}

public void setPurchaseDate(String purchaseDate) {
this.purchaseDate = purchaseDate;
}

public double getPurchasePrice() {
return purchasePrice;
}

public void setPurchasePrice(double purchasePrice) {
this.purchasePrice = purchasePrice;
}

public int getQuantity() {
return quantity;
}

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