Skip to content

Commit

Permalink
PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilDigitalJustice committed Dec 13, 2023
1 parent f8a17f8 commit 03fdb8e
Show file tree
Hide file tree
Showing 6 changed files with 250 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package uk.gov.laa.ccms.data.api;

import java.util.Random;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.test.annotation.DirtiesContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package uk.gov.laa.ccms.caab.api.entity;


import jakarta.persistence.Access;
import jakarta.persistence.AccessType;
import jakarta.persistence.Column;
import jakarta.persistence.Convert;
import jakarta.persistence.Embedded;
Expand Down Expand Up @@ -69,7 +67,6 @@ public class Address implements Serializable {
private String careOf;

@Column(name = "PREFERRED_ADDRESS", length = 50)
@Access(AccessType.PROPERTY)
private String preferredAddress;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.MapKey;
import jakarta.persistence.OneToMany;
import jakarta.persistence.OrderBy;
import jakarta.persistence.SequenceGenerator;
Expand All @@ -21,13 +20,9 @@
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;
import org.hibernate.annotations.LazyGroup;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,111 +39,261 @@
@RequiredArgsConstructor
public class Opponent implements Serializable {

/**
* The unique identifier for the Opponent.
*/
@Id
@GeneratedValue(generator = "XXCCMS_OPPONENT_S")
private Long id;

/**
* The audit trail information for the Opponent.
*/
@Embedded
private AuditTrail auditTrail = new AuditTrail();

/**
* The application associated with the Opponent.
*/
@ManyToOne
@JoinColumn(name = "FK_APPLICATION", nullable = false)
private Application application;

/**
* The EBS ID of the Opponent.
*/
@Column(name = "EBS_ID", length = 50)
private String ebsId;

/**
* The type of the Opponent.
*/
@Column(name = "TYPE", length = 50)
private String type;

/**
* The title of the Opponent.
*/
@Column(name = "TITLE", length = 50)
private String title;

/**
* The first name of the Opponent.
*/
@Column(name = "FIRST_NAME", length = 35)
private String firstName;

/**
* The middle names of the Opponent.
*/
@Column(name = "MIDDLE_NAMES", length = 35)
private String middleNames;

/**
* The surname of the Opponent.
*/
@Column(name = "SURNAME", length = 35)
private String surname;

/**
* The date of birth of the Opponent.
*/
@Column(name = "DATE_OF_BIRTH")
private Date dateOfBirth;

/**
* The national insurance number of the Opponent.
*/
@Column(name = "NATIONAL_INSURANCE_NUMBER", length = 9)
private String nationalInsuranceNumber;

/**
* The address of the Opponent.
*/
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "FK_ADDRESS")
private Address address;

/**
* The relationship to the case of the Opponent.
*/
@Column(name = "RELATIONSHIP_TO_CASE", length = 50)
private String relationshipToCase;

/**
* The relationship to the client of the Opponent.
*/
@Column(name = "RELATIONSHIP_TO_CLIENT", length = 50)
private String relationshipToClient;

/**
* The home telephone number of the Opponent.
*/
@Column(name = "TELEPHONE_HOME", length = 15)
private String telephoneHome;

/**
* The work telephone number of the Opponent.
*/
@Column(name = "TELEPHONE_WORK", length = 15)
private String telephoneWork;

/**
* The mobile telephone number of the Opponent.
*/
@Column(name = "TELEPHONE_MOBILE", length = 15)
private String telephoneMobile;

/**
* The fax number of the Opponent.
*/
@Column(name = "FAX_NUMBER", length = 15)
private String faxNumber;

/**
* The email address of the Opponent.
*/
@Column(name = "EMAIL_ADDRESS", length = 254)
private String emailAddress;

/**
* Additional information about the Opponent.
*/
@Column(name = "OTHER_INFORMATION", length = 2000)
private String otherInformation;

/**
* The employment status of the Opponent.
*/
@Column(name = "EMPLOYMENT_STATUS", length = 25)
private String employmentStatus;

/**
* The name of the employer of the Opponent.
*/
@Column(name = "EMPLOYER_NAME", length = 35)
private String employerName;

/**
* The address of the employer of the Opponent.
*/
@Column(name = "EMPLOYER_ADDRESS", length = 200)
private String employerAddress;

/**
* Indicates if the Opponent is eligible for legal aid.
*/
@Column(name = "LEGAL_AIDED")
private Boolean legalAided;

/**
* The certificate number for legal aid.
*/
@Column(name = "CERTIFICATE_NUMBER", length = 35)
private String certificateNumber;

/**
* Indicates if a court-ordered means assessment is required for the Opponent.
*/
@Column(name = "COURT_ORDERDED_MEANS_ASSMT", length = 10)
private Boolean courtOrderedMeansAssessment;

/**
* The assessed income of the Opponent.
*/
@Column(name = "ASSESSED_INCOME", precision = 10, scale = 2)
private BigDecimal assessedIncome;

/**
* The frequency of the assessed income.
*/
@Column(name = "ASSESSED_INCOME_FREQUENCY", length = 25)
private String assessedIncomeFrequency;

/**
* The assessed assets of the Opponent.
*/
@Column(name = "ASSESSED_ASSETS", precision = 10, scale = 2)
private BigDecimal assessedAssets;

/**
* The date of assessment for the Opponent.
*/
@Column(name = "ASSESSMENT_DATE")
private Date assessmentDate;

/**
* The name of the organization associated with the Opponent.
*/
@Column(name = "ORGANISATION_NAME", length = 360)
private String organisationName;

/**
* The type of the organization associated with the Opponent.
*/
@Column(name = "ORGANISATION_TYPE", length = 50)
private String organisationType;

/**
* Indicates if the organization is currently trading.
*/
@Column(name = "CURRENTLY_TRADING", length = 10)
private Boolean currentlyTrading;

/**
* The role of the contact name associated with the Opponent.
*/
@Column(name = "CONTACT_NAME_ROLE", length = 35)
private String contactNameRole;

/**
* Indicates if the Opponent is confirmed.
*/
@Column(name = "CONFIRMED")
private boolean confirmed;

/**
* Indicates the application mode.
*/
@Column(name = "APPMODE")
private boolean appMode = true;

/**
* Indicates if the Opponent represents an amendment.
*/
@Column(name = "AMENDMENT")
private boolean amendment = false;

/**
* Indicates if the Opponent is awarded.
*/
@Column(name = "AWARD")
private boolean award = false;

/**
* Indicates if public funding has been applied for.
*/
@Column(name = "PUBLIC_FUNDING_APPLIED")
private boolean publicFundingApplied;

/**
* Indicates if the Opponent is shared.
*/
@Column(name = "SHARED_IND")
private boolean sharedInd = false;

/**
* Indicates if the Opponent is marked for deletion.
*/
@Column(name = "DELETE_IND")
private boolean deleteInd = true;

/**
* The outcome associated with the Opponent.
*/
@ManyToOne
@JoinColumn(name = "FK_OUTCOME")
private CaseOutcome outcome;


}
Loading

0 comments on commit 03fdb8e

Please sign in to comment.