Skip to content

Commit

Permalink
feat(be:FSADT1-1277): Part #3
Browse files Browse the repository at this point in the history
  • Loading branch information
mamartinezmejia committed Apr 7, 2024
1 parent a4223d0 commit fccd543
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import ca.bc.gov.app.dto.ClientNameCodeDto;
import ca.bc.gov.app.dto.ForestClientDto;
import org.springframework.aot.hint.annotation.RegisterReflectionForBinding;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;

@Configuration
@RegisterReflectionForBinding({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package ca.bc.gov.app.dto;


import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.With;

@With
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Column;
import org.springframework.data.relational.core.mapping.Table;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

@NoArgsConstructor
@AllArgsConstructor
Expand All @@ -22,84 +24,118 @@ public class ForestClientLocationEntity {

@Id
@Column("client_number")
@Size(min = 1, max = 8)
private String clientNumber;

@Column("client_locn_code")
@NotNull
@Size(min = 1, max = 2)
private String clientLocnCode;

@Column("client_locn_name")
@Size(min = 1, max = 40)
private String clientLocnName;

@Column("hdbs_company_code")
@Size(min = 1, max = 5)
private String hdbsCompanyCode;

@Column("address_1")
@NotNull
@Size(min = 1, max = 40)
private String addressOne;

@Column("address_2")
@Size(min = 1, max = 40)
private String addressTwo;

@Column("address_3")
@Size(min = 1, max = 40)
private String addressThree;

@Column("city")
@NotNull
@Size(min = 1, max = 30)
private String city;

@Column("province")
@Size(min = 1, max = 50)
private String province;

@Column("postal_code")
@Size(min = 1, max = 10)
private String postalCode;

@Column("country")
@NotNull
@Size(min = 1, max = 50)
private String country;

@Column("business_phone")
@Size(min = 1, max = 10)
private String businessPhone;

@Column("home_phone")
@Size(min = 1, max = 10)
private String homePhone;

@Column("cell_phone")
@Size(min = 1, max = 10)
private String cellPhone;

@Column("fax_number")
@Size(min = 1, max = 10)
private String faxNumber;

@Column("email_address")
@Size(min = 1, max = 128)
private String emailAddress;

@Column("locn_expired_ind ")
@Column("locn_expired_ind")
@NotNull
@Size(min = 1, max = 1)
private String locnExpiredInd;

@Column("returned_mail_date")
private LocalDate returnedMailDate;

@Column("trust_location_ind")
@NotNull
@Size(min = 1, max = 1)
private String trustLocationInd;

@Column("cli_locn_comment")
@Size(min = 1, max = 4000)
private String cliLocnComment;

@Column("add_timestamp")
@NotNull
private LocalDateTime createdAt;

@Column("add_userid")
@NotNull
@Size(min = 1, max = 30)
private String createdBy;

@Column("update_timestamp")
@NotNull
private LocalDateTime updatedAt;

@Column("update_userid")
@NotNull
@Size(min = 1, max = 30)
private String updatedBy;

@Column("update_org_unit")
@NotNull
private Long updatedByUnit;

@Column("add_org_unit")
@NotNull
private Long createdByUnit;

@Column("revision_count")
@NotNull
private Long revision;

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ public class ForestClientLocationEntityId {

@Column("client_locn_code")
private String clientLocnCode;

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package ca.bc.gov.app.repository;

import ca.bc.gov.app.entity.ClientDoingBusinessAsEntity;
import org.springframework.data.domain.Pageable;
import org.springframework.data.r2dbc.repository.Query;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import org.springframework.data.repository.reactive.ReactiveSortingRepository;
Expand All @@ -25,4 +24,5 @@ public interface ClientDoingBusinessAsRepository extends
Flux<ClientDoingBusinessAsEntity> matchBy(String companyName);

Flux<ClientDoingBusinessAsEntity> findByDoingBusinessAsName(String doingBusinessAsName);

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
import static org.junit.jupiter.api.Assertions.*;

import ca.bc.gov.app.dto.ForestClientContactDto;
import ca.bc.gov.app.dto.ForestClientLocationDto;
import ca.bc.gov.app.entity.ForestClientContactEntity;
import ca.bc.gov.app.entity.ForestClientLocationEntity;
import java.time.LocalDateTime;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
Expand Down

0 comments on commit fccd543

Please sign in to comment.