FIX Structure of Project
This commit is contained in:
parent
758e71ad5e
commit
0e8515e06e
@ -1,7 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis.advice;
|
package com.dh7789dev.xpeditis.advice;
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.NlsService;
|
import com.dh7789dev.xpeditis.NlsService;
|
||||||
import com.dh7789dev.xpeditis.dto.CustomInternalExceptionResponse;
|
import com.dh7789dev.xpeditis.exception.CustomInternalExceptionResponse;
|
||||||
import com.dh7789dev.xpeditis.exception.CustomInternalException;
|
import com.dh7789dev.xpeditis.exception.CustomInternalException;
|
||||||
import com.dh7789dev.xpeditis.exception.GlobalNotFoundException;
|
import com.dh7789dev.xpeditis.exception.GlobalNotFoundException;
|
||||||
import com.dh7789dev.xpeditis.exception.StorageException;
|
import com.dh7789dev.xpeditis.exception.StorageException;
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package com.dh7789dev.xpeditis.controller.api.v1;
|
package com.dh7789dev.xpeditis.controller.api.v1;
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.AuthenticationService;
|
import com.dh7789dev.xpeditis.AuthenticationService;
|
||||||
import com.dh7789dev.xpeditis.dto.AuthenticationRequest;
|
import com.dh7789dev.xpeditis.dto.request.AuthenticationRequest;
|
||||||
import com.dh7789dev.xpeditis.dto.AuthenticationResponse;
|
import com.dh7789dev.xpeditis.dto.response.AuthenticationResponse;
|
||||||
import com.dh7789dev.xpeditis.dto.RegisterRequest;
|
import com.dh7789dev.xpeditis.dto.request.RegisterRequest;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@ -22,7 +22,7 @@ public class AuthenticationRestController {
|
|||||||
|
|
||||||
private final AuthenticationService service;
|
private final AuthenticationService service;
|
||||||
|
|
||||||
@PostMapping("/authenticate")
|
@PostMapping("/login")
|
||||||
public ResponseEntity<AuthenticationResponse> authenticate(
|
public ResponseEntity<AuthenticationResponse> authenticate(
|
||||||
@RequestBody @Valid AuthenticationRequest request) {
|
@RequestBody @Valid AuthenticationRequest request) {
|
||||||
return ResponseEntity.ok(service.authenticate(request));
|
return ResponseEntity.ok(service.authenticate(request));
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis.controller.api.v1;
|
package com.dh7789dev.xpeditis.controller.api.v1;
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.UserService;
|
import com.dh7789dev.xpeditis.UserService;
|
||||||
import com.dh7789dev.xpeditis.dto.ChangePasswordRequest;
|
import com.dh7789dev.xpeditis.dto.request.ChangePasswordRequest;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
|
|||||||
@ -78,8 +78,7 @@ public class GlobalConfiguration {
|
|||||||
CorsConfiguration configuration = new CorsConfiguration();
|
CorsConfiguration configuration = new CorsConfiguration();
|
||||||
//configuration.setAllowCredentials(true);
|
//configuration.setAllowCredentials(true);
|
||||||
configuration.setAllowedOrigins(List.of("http://localhost:8080", "http://localhost:3000",
|
configuration.setAllowedOrigins(List.of("http://localhost:8080", "http://localhost:3000",
|
||||||
"http://127.0.0.1:8080", "https://leblr.preprod.weworkstudio.fr","https://leblr.fr",
|
"http://127.0.0.1:8080"));
|
||||||
"https://api.leblr.preprod.weworkstudio.fr/","https://api.leblr.fr/", "https://www.leblr.fr"));
|
|
||||||
configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH"));
|
configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH"));
|
||||||
configuration.setAllowedHeaders(List.of("*"));
|
configuration.setAllowedHeaders(List.of("*"));
|
||||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||||
@ -87,4 +86,10 @@ public class GlobalConfiguration {
|
|||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public UserDetailsService userDetailsService() {
|
||||||
|
return username -> userDao.findByUsername(username)
|
||||||
|
.orElseThrow(() -> new UsernameNotFoundException(String.format(USER_NOT_FOUND_MSG, username)));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,7 +24,7 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
|||||||
private static final String AUTH_HEADER = "Authorization";
|
private static final String AUTH_HEADER = "Authorization";
|
||||||
private static final String AUTH_TYPE = "Bearer ";
|
private static final String AUTH_TYPE = "Bearer ";
|
||||||
|
|
||||||
|
|
||||||
private final UserDetailsService userDetailsService;
|
private final UserDetailsService userDetailsService;
|
||||||
private final JwtUtil jwtUtil;
|
private final JwtUtil jwtUtil;
|
||||||
private final TokenDao tokenDao;
|
private final TokenDao tokenDao;
|
||||||
|
|||||||
@ -34,6 +34,7 @@ public class SecurityConfiguration {
|
|||||||
boolean csrfEnabled;
|
boolean csrfEnabled;
|
||||||
|
|
||||||
private static final String ADMIN_ROLE = "ADMIN";
|
private static final String ADMIN_ROLE = "ADMIN";
|
||||||
|
private static final String ADMIN_PLATFORM_ROLE = "ADMIN_PLATFORM";
|
||||||
|
|
||||||
private static final String API_V1_URI = "/api/v1/**";
|
private static final String API_V1_URI = "/api/v1/**";
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
spring:
|
spring:
|
||||||
h2:
|
h2:
|
||||||
console:
|
console:
|
||||||
enabled: 'true'
|
enabled: 'false'
|
||||||
|
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:h2:mem:xpeditis;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
|
url: jdbc:h2:mem:xpeditis;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
|
||||||
|
|||||||
@ -38,7 +38,10 @@ spring:
|
|||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
org:
|
org:
|
||||||
|
org.hibernate.orm.query.sqm.ast.logTree: OFF
|
||||||
springframework:
|
springframework:
|
||||||
|
boot:
|
||||||
|
autoconfigure: OFF
|
||||||
web:
|
web:
|
||||||
filter:
|
filter:
|
||||||
CommonsRequestLoggingFilter: INFO
|
CommonsRequestLoggingFilter: INFO
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
|
|
||||||
public interface AddressService {
|
public interface AddressService {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.dto.AuthenticationRequest;
|
import com.dh7789dev.xpeditis.dto.request.AuthenticationRequest;
|
||||||
import com.dh7789dev.xpeditis.dto.AuthenticationResponse;
|
import com.dh7789dev.xpeditis.dto.response.AuthenticationResponse;
|
||||||
import com.dh7789dev.xpeditis.dto.RegisterRequest;
|
import com.dh7789dev.xpeditis.dto.request.RegisterRequest;
|
||||||
|
|
||||||
public interface AuthenticationService {
|
public interface AuthenticationService {
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
public class LicenseService {
|
public interface LicenseService {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.dto.ChangePasswordRequest;
|
import com.dh7789dev.xpeditis.dto.request.ChangePasswordRequest;
|
||||||
|
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,20 @@
|
|||||||
package com.dh7789dev.xpeditis.dto.app;
|
package com.dh7789dev.xpeditis.dto.app;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
public class Address {
|
public class Address {
|
||||||
|
private Long id;
|
||||||
|
private String companyName;
|
||||||
|
private String address;
|
||||||
|
private String postalCode;
|
||||||
|
private String country;
|
||||||
|
private String type;
|
||||||
|
private Company company;
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
private LocalDateTime modifiedAt;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.dh7789dev.xpeditis.dto;
|
package com.dh7789dev.xpeditis.dto.app;
|
||||||
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
|||||||
@ -1,4 +1,13 @@
|
|||||||
package com.dh7789dev.xpeditis.dto;
|
package com.dh7789dev.xpeditis.dto.app;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
public class Dimension {
|
public class Dimension {
|
||||||
|
private Long id;
|
||||||
|
private Double length;
|
||||||
|
private Double width;
|
||||||
|
private Double height;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,14 @@
|
|||||||
package com.dh7789dev.xpeditis.dto.app;
|
package com.dh7789dev.xpeditis.dto.app;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
public class Document {
|
public class Document {
|
||||||
|
private Long id;
|
||||||
|
private String fileName;
|
||||||
|
private String contentType;
|
||||||
|
private byte[] data;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
package com.dh7789dev.xpeditis.dto;
|
package com.dh7789dev.xpeditis.dto.app;
|
||||||
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@ -15,5 +16,7 @@ public class ExportFolder {
|
|||||||
private LocalDateTime validationDate;
|
private LocalDateTime validationDate;
|
||||||
private Company company;
|
private Company company;
|
||||||
private Quote quote;
|
private Quote quote;
|
||||||
|
private List<Document> documents;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.dh7789dev.xpeditis.dto;
|
package com.dh7789dev.xpeditis.dto.app;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|||||||
@ -1,4 +1,19 @@
|
|||||||
package com.dh7789dev.xpeditis.dto.app;
|
package com.dh7789dev.xpeditis.dto.app;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
public class Notification {
|
public class Notification {
|
||||||
|
private Long id;
|
||||||
|
private String message;
|
||||||
|
private String type; // EMAIL, SMS, WEB
|
||||||
|
private boolean read;
|
||||||
|
private String recipient;
|
||||||
|
private ExportFolder exportFolder;
|
||||||
|
private LocalDateTime createdAt;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.dh7789dev.xpeditis.dto;
|
package com.dh7789dev.xpeditis.dto.app;
|
||||||
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.dh7789dev.xpeditis.dto;
|
package com.dh7789dev.xpeditis.dto.app;
|
||||||
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@ -9,7 +9,7 @@ import lombok.Data;
|
|||||||
public class QuoteDetail {
|
public class QuoteDetail {
|
||||||
private Long id;
|
private Long id;
|
||||||
private Integer quantity;
|
private Integer quantity;
|
||||||
private DimensionDTO dimension;
|
private Dimension dimension;
|
||||||
private Double weight;
|
private Double weight;
|
||||||
private boolean stackable;
|
private boolean stackable;
|
||||||
private Long quoteId;
|
private Long quoteId;
|
||||||
|
|||||||
@ -1,4 +1,26 @@
|
|||||||
package com.dh7789dev.xpeditis.dto.app;
|
package com.dh7789dev.xpeditis.dto.app;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
public class ShipmentTracking {
|
public class ShipmentTracking {
|
||||||
|
private Long id;
|
||||||
|
private String containerNumber;
|
||||||
|
private String imoNumber;
|
||||||
|
private String mmsiNumber;
|
||||||
|
private String vesselName;
|
||||||
|
private Double currentLatitude;
|
||||||
|
private Double currentLongitude;
|
||||||
|
private Double speedKnots;
|
||||||
|
private String status; // e.g. "Underway", "Moored", etc.
|
||||||
|
private LocalDateTime eta;
|
||||||
|
private LocalDateTime lastReported;
|
||||||
|
private ExportFolder exportFolder;
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
private LocalDateTime modifiedAt;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.dh7789dev.xpeditis.dto;
|
package com.dh7789dev.xpeditis.dto.app;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|||||||
@ -1,4 +1,43 @@
|
|||||||
package com.dh7789dev.xpeditis.dto.app;
|
package com.dh7789dev.xpeditis.dto.app;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
public class VesselSchedule {
|
public class VesselSchedule {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@JsonProperty("IMO")
|
||||||
|
private String imoNumber;
|
||||||
|
|
||||||
|
@JsonProperty("MMSI")
|
||||||
|
private String mmsiNumber;
|
||||||
|
|
||||||
|
@JsonProperty("SHIPNAME")
|
||||||
|
private String vesselName;
|
||||||
|
|
||||||
|
@JsonProperty("VOYAGE")
|
||||||
|
private String voyageNumber;
|
||||||
|
|
||||||
|
@JsonProperty("DEPARTURE_PORT")
|
||||||
|
private String departurePort;
|
||||||
|
|
||||||
|
@JsonProperty("ARRIVAL_PORT")
|
||||||
|
private String arrivalPort;
|
||||||
|
|
||||||
|
@JsonProperty("DEPARTURE_DATE")
|
||||||
|
private LocalDateTime departureDate;
|
||||||
|
|
||||||
|
@JsonProperty("ARRIVAL_DATE")
|
||||||
|
private LocalDateTime arrivalDate;
|
||||||
|
|
||||||
|
private LocalDateTime lastUpdated;
|
||||||
|
|
||||||
|
private ExportFolder exportFolder;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.dh7789dev.xpeditis.dto;
|
package com.dh7789dev.xpeditis.dto.request;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.dh7789dev.xpeditis.dto;
|
package com.dh7789dev.xpeditis.dto.request;
|
||||||
|
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.dh7789dev.xpeditis.dto;
|
package com.dh7789dev.xpeditis.dto.request;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.dh7789dev.xpeditis.dto;
|
package com.dh7789dev.xpeditis.dto.response;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.dh7789dev.xpeditis.dto.app;
|
package com.dh7789dev.xpeditis.exception;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
public class AddressServiceImpl {
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class AddressServiceImpl implements AddressService{
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.dto.AuthenticationRequest;
|
import com.dh7789dev.xpeditis.dto.request.AuthenticationRequest;
|
||||||
import com.dh7789dev.xpeditis.dto.AuthenticationResponse;
|
import com.dh7789dev.xpeditis.dto.response.AuthenticationResponse;
|
||||||
import com.dh7789dev.xpeditis.dto.RegisterRequest;
|
import com.dh7789dev.xpeditis.dto.request.RegisterRequest;
|
||||||
import com.dh7789dev.xpeditis.dto.UserAccount;
|
|
||||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ -23,6 +21,6 @@ public class AuthenticationServiceImpl implements AuthenticationService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AuthenticationResponse register(RegisterRequest request) {
|
public AuthenticationResponse register(RegisterRequest request) {
|
||||||
return null;
|
return authenticationRepository.register(request);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
public class CompanyServiceImpl {
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class CompanyServiceImpl implements CompanyService {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
public class DimensionServiceImpl {
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class DimensionServiceImpl implements DimensionService {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
public class DocumentServiceImpl {
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class DocumentServiceImpl implements DocumentService {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
public class ExportFolderServiceImpl {
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ExportFolderServiceImpl implements ExportFolderService {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
public class LicenseServiceImpl {
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class LicenseServiceImpl implements LicenseService {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
public class NotificationServiceImpl {
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class NotificationServiceImpl implements NotificationService {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
public class QuoteDetailsServiceImpl {
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class QuoteDetailsServiceImpl implements QuoteDetailsService {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
public class QuoteServiceImpl {
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class QuoteServiceImpl implements QuoteService {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
public class ShipmentTrackingServiceImpl {
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class ShipmentTrackingServiceImpl implements ShipmentTrackingService {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.dto.ChangePasswordRequest;
|
import com.dh7789dev.xpeditis.dto.request.ChangePasswordRequest;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
public class VesselScheduleServiceImpl {
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class VesselScheduleServiceImpl implements VesselScheduleService {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.dto.AuthenticationRequest;
|
import com.dh7789dev.xpeditis.dto.request.AuthenticationRequest;
|
||||||
import com.dh7789dev.xpeditis.dto.AuthenticationResponse;
|
import com.dh7789dev.xpeditis.dto.response.AuthenticationResponse;
|
||||||
|
import com.dh7789dev.xpeditis.dto.request.RegisterRequest;
|
||||||
|
|
||||||
public interface AuthenticationRepository {
|
public interface AuthenticationRepository {
|
||||||
|
|
||||||
AuthenticationResponse authenticate(AuthenticationRequest request);
|
AuthenticationResponse authenticate(AuthenticationRequest request);
|
||||||
|
AuthenticationResponse register(RegisterRequest request);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package com.dh7789dev.xpeditis;
|
package com.dh7789dev.xpeditis;
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.dto.ChangePasswordRequest;
|
import com.dh7789dev.xpeditis.dto.request.ChangePasswordRequest;
|
||||||
|
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
package com.dh7789dev.xpeditis.dao;
|
package com.dh7789dev.xpeditis.dao;
|
||||||
|
|
||||||
public interface Address {
|
import com.dh7789dev.xpeditis.entity.AddressEntity;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
|
||||||
|
public interface AddressDao extends JpaRepository<AddressEntity, Long> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,5 +3,6 @@ package com.dh7789dev.xpeditis.dao;
|
|||||||
import com.dh7789dev.xpeditis.entity.CompanyEntity;
|
import com.dh7789dev.xpeditis.entity.CompanyEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
|
||||||
public interface CompanyDao extends JpaRepository<CompanyEntity, Long> {
|
public interface CompanyDao extends JpaRepository<CompanyEntity, Long> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
package com.dh7789dev.xpeditis.dao;
|
package com.dh7789dev.xpeditis.dao;
|
||||||
|
|
||||||
public interface DimensionDao {
|
import com.dh7789dev.xpeditis.entity.DimensionEntity;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
|
||||||
|
public interface DimensionDao extends JpaRepository<DimensionEntity, Long> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis.dao;
|
package com.dh7789dev.xpeditis.dao;
|
||||||
|
|
||||||
public interface DocumentDao {
|
import com.dh7789dev.xpeditis.entity.DocumentEntity;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface DocumentDao extends JpaRepository<DocumentEntity, Long> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis.dao;
|
package com.dh7789dev.xpeditis.dao;
|
||||||
|
|
||||||
|
import com.dh7789dev.xpeditis.entity.LicenseEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
public interface LicenseDao extends JpaRepository<LicenseDao, Long> {
|
public interface LicenseDao extends JpaRepository<LicenseEntity, Long> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis.dao;
|
package com.dh7789dev.xpeditis.dao;
|
||||||
|
|
||||||
public class NotificationDao {
|
import com.dh7789dev.xpeditis.entity.NotificationEntity;
|
||||||
}
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface NotificationDao extends JpaRepository<NotificationEntity, Long> {
|
||||||
|
}
|
||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis.dao;
|
package com.dh7789dev.xpeditis.dao;
|
||||||
|
|
||||||
public interface QuoteDetailDao {
|
import com.dh7789dev.xpeditis.entity.QuoteDetailEntity;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface QuoteDetailDao extends JpaRepository<QuoteDetailEntity, Long> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis.dao;
|
package com.dh7789dev.xpeditis.dao;
|
||||||
|
|
||||||
public class ShipmentTrackingDao {
|
import com.dh7789dev.xpeditis.entity.ShipmentTrackingEntity;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
public interface ShipmentTrackingDao extends JpaRepository<ShipmentTrackingEntity, Long> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,13 +6,16 @@ import org.springframework.data.jpa.repository.Query;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
public interface TokenDao extends JpaRepository<TokenEntity, Integer> {
|
public interface TokenDao extends JpaRepository<TokenEntity, Integer> {
|
||||||
|
|
||||||
Optional<TokenEntity> findByToken(String token);
|
Optional<TokenEntity> findByToken(String token);
|
||||||
|
|
||||||
@Query(value = """
|
@Query(value = """
|
||||||
select t from TokenEntity t inner join UserAccountEntity u\s
|
select t from TokenEntity t inner join UserEntity u\s
|
||||||
on t.user.id = u.id\s
|
on t.user.id = u.id\s
|
||||||
where u.id = :userId and (t.expired = false or t.revoked = false)\s
|
where u.id = :userId and (t.expired = false or t.revoked = false)\s
|
||||||
""")
|
""")
|
||||||
|
|||||||
@ -5,7 +5,13 @@ import org.springframework.data.jpa.repository.JpaRepository;
|
|||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
public interface UserDao extends JpaRepository<UserEntity, Long> {
|
public interface UserDao extends JpaRepository<UserEntity, Long> {
|
||||||
|
|
||||||
|
@Query("SELECT u FROM UserEntity u WHERE u.username = :username")
|
||||||
Optional<UserEntity> findByUsername(String username);
|
Optional<UserEntity> findByUsername(String username);
|
||||||
|
boolean existsByUsername(String username);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
package com.dh7789dev.xpeditis.dao;
|
package com.dh7789dev.xpeditis.dao;
|
||||||
|
|
||||||
public class VesselScheduleDao {
|
import com.dh7789dev.xpeditis.entity.VesselScheduleEntity;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface VesselScheduleDao extends JpaRepository<VesselScheduleEntity, Long> {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,62 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
public class AddressEntity {
|
import jakarta.persistence.*;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.experimental.FieldDefaults;
|
||||||
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@FieldNameConstants
|
||||||
|
@FieldDefaults( level = AccessLevel.PRIVATE)
|
||||||
|
@Table(name = "Address")
|
||||||
|
public class AddressEntity extends BaseEntity {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Column(name = "company_name", length = 100)
|
||||||
|
private String companyName;
|
||||||
|
|
||||||
|
@Column(name = "address", length = 200)
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
@Column(name = "postal_code", length = 10)
|
||||||
|
private String postalCode;
|
||||||
|
|
||||||
|
@Column(name = "country", length = 50)
|
||||||
|
private String country;
|
||||||
|
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
|
@Column(name = "type", length = 20, nullable = false)
|
||||||
|
private AddressType type;
|
||||||
|
|
||||||
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
|
@JoinColumn(name = "company_id", nullable = false)
|
||||||
|
private CompanyEntity company;
|
||||||
|
|
||||||
|
@Column(name = "created_at", updatable = false)
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
@Column(name = "modified_at")
|
||||||
|
private LocalDateTime modifiedAt;
|
||||||
|
|
||||||
|
@PrePersist
|
||||||
|
public void onCreate() {
|
||||||
|
createdAt = LocalDateTime.now();
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreUpdate
|
||||||
|
public void onUpdate() {
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,14 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
public enum AdresseType {
|
import lombok.Getter;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public enum AddressType {
|
||||||
|
SHIPPER("Shipper"),
|
||||||
|
CONSIGNEE("Consignee"),
|
||||||
|
NOTIFY("Notify");
|
||||||
|
|
||||||
|
private final String displayName;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,19 +1,43 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.experimental.FieldDefaults;
|
||||||
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@FieldNameConstants
|
||||||
|
@FieldDefaults( level = AccessLevel.PRIVATE)
|
||||||
|
@Table(name = "Company")
|
||||||
public class CompanyEntity extends BaseEntity {
|
public class CompanyEntity extends BaseEntity {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@Column(name = "name", length = 50)
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@Column(name = "country", length = 50)
|
||||||
private String country;
|
private String country;
|
||||||
|
|
||||||
|
@Column(name = "siren")
|
||||||
|
private String siren;
|
||||||
|
|
||||||
|
@Column(name = "num_eori")
|
||||||
|
private String num_eori;
|
||||||
|
|
||||||
|
@Column(name = "phone", length = 20)
|
||||||
|
private String phone;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "company", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "company", cascade = CascadeType.ALL)
|
||||||
private List<UserEntity> users;
|
private List<UserEntity> users;
|
||||||
|
|
||||||
@ -22,5 +46,22 @@ public class CompanyEntity extends BaseEntity {
|
|||||||
|
|
||||||
@OneToMany(mappedBy = "company", cascade = CascadeType.ALL)
|
@OneToMany(mappedBy = "company", cascade = CascadeType.ALL)
|
||||||
private List<ExportFolderEntity> exports;
|
private List<ExportFolderEntity> exports;
|
||||||
|
|
||||||
|
@Column(name = "created_at", updatable = false)
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
@Column(name = "modified_at")
|
||||||
|
private LocalDateTime modifiedAt;
|
||||||
|
|
||||||
|
@PrePersist
|
||||||
|
public void onCreate() {
|
||||||
|
createdAt = LocalDateTime.now();
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreUpdate
|
||||||
|
public void onUpdate() {
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,34 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.experimental.FieldDefaults;
|
||||||
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@FieldNameConstants
|
||||||
|
@FieldDefaults( level = AccessLevel.PRIVATE)
|
||||||
|
@Table(name = "dimension")
|
||||||
public class DimensionEntity {
|
public class DimensionEntity {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Column(name = "length")
|
||||||
|
private Double length;
|
||||||
|
|
||||||
|
@Column(name = "width")
|
||||||
|
private Double width;
|
||||||
|
|
||||||
|
@Column(name = "height")
|
||||||
|
private Double height;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,61 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.experimental.FieldDefaults;
|
||||||
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@FieldNameConstants
|
||||||
|
@FieldDefaults( level = AccessLevel.PRIVATE)
|
||||||
|
@Table(name = "document")
|
||||||
public class DocumentEntity {
|
public class DocumentEntity {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Column(unique = true)
|
||||||
|
private String reference;
|
||||||
|
|
||||||
|
@Column(name = "file_name", nullable = false)
|
||||||
|
private String fileName;
|
||||||
|
|
||||||
|
@Column(name = "content_type")
|
||||||
|
private String contentType;
|
||||||
|
|
||||||
|
@Lob
|
||||||
|
@Column(name = "data", nullable = false)
|
||||||
|
private byte[] data;
|
||||||
|
|
||||||
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
|
@JoinColumn(name = "export_folder_id")
|
||||||
|
private ExportFolderEntity exportFolder;
|
||||||
|
|
||||||
|
@Column(name = "created_at", updatable = false)
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
@Column(name = "modified_at")
|
||||||
|
private LocalDateTime modifiedAt;
|
||||||
|
|
||||||
|
@PrePersist
|
||||||
|
public void onCreate() {
|
||||||
|
createdAt = LocalDateTime.now();
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreUpdate
|
||||||
|
public void onUpdate() {
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,24 +1,63 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.experimental.FieldDefaults;
|
||||||
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@FieldNameConstants
|
||||||
|
@FieldDefaults( level = AccessLevel.PRIVATE)
|
||||||
|
@Table(name = "exportfolder")
|
||||||
public class ExportFolderEntity extends BaseEntity {
|
public class ExportFolderEntity extends BaseEntity {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@Column(unique = true)
|
||||||
private String reference;
|
private String reference;
|
||||||
|
|
||||||
|
@Column(name = "validationDate")
|
||||||
private LocalDateTime validationDate;
|
private LocalDateTime validationDate;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "exportFolder", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||||
|
private List<DocumentEntity> documents;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "exportFolder", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||||
|
private List<ShipmentTrackingEntity> trackingUpdates = new ArrayList<>();
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private CompanyEntity company;
|
private CompanyEntity company;
|
||||||
|
|
||||||
@OneToOne
|
@OneToOne
|
||||||
@JoinColumn(name = "quote_id", unique = true)
|
@JoinColumn(name = "quote_id", unique = true)
|
||||||
private QuoteEntity quote;
|
private QuoteEntity quote;
|
||||||
|
|
||||||
|
@Column(name = "created_at", updatable = false)
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
@Column(name = "modified_at")
|
||||||
|
private LocalDateTime modifiedAt;
|
||||||
|
|
||||||
|
@PrePersist
|
||||||
|
public void onCreate() {
|
||||||
|
createdAt = LocalDateTime.now();
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreUpdate
|
||||||
|
public void onUpdate() {
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,17 +1,32 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.experimental.FieldDefaults;
|
||||||
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@FieldNameConstants
|
||||||
|
@FieldDefaults( level = AccessLevel.PRIVATE)
|
||||||
|
@Table(name = "License")
|
||||||
public class LicenseEntity extends BaseEntity {
|
public class LicenseEntity extends BaseEntity {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@Column(unique = true)
|
||||||
private String licenseKey;
|
private String licenseKey;
|
||||||
|
|
||||||
|
@Column(name = "expirationDate")
|
||||||
private LocalDate expirationDate;
|
private LocalDate expirationDate;
|
||||||
|
|
||||||
private boolean active;
|
private boolean active;
|
||||||
@ -19,5 +34,22 @@ public class LicenseEntity extends BaseEntity {
|
|||||||
@OneToOne
|
@OneToOne
|
||||||
@JoinColumn(name = "user_id", unique = true)
|
@JoinColumn(name = "user_id", unique = true)
|
||||||
private UserEntity user;
|
private UserEntity user;
|
||||||
|
|
||||||
|
@Column(name = "created_at", updatable = false)
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
@Column(name = "modified_at")
|
||||||
|
private LocalDateTime modifiedAt;
|
||||||
|
|
||||||
|
@PrePersist
|
||||||
|
public void onCreate() {
|
||||||
|
createdAt = LocalDateTime.now();
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreUpdate
|
||||||
|
public void onUpdate() {
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,39 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "notification")
|
||||||
public class NotificationEntity {
|
public class NotificationEntity {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Column(nullable = false)
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
|
@Column(nullable = false)
|
||||||
|
private NotificationType type; // EMAIL, SMS, WEB
|
||||||
|
|
||||||
|
@Column(nullable = false)
|
||||||
|
private boolean read = false;
|
||||||
|
|
||||||
|
@Column(name = "recipient")
|
||||||
|
private String recipient; // email ou numéro téléphone
|
||||||
|
|
||||||
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
|
@JoinColumn(name = "export_folder_id")
|
||||||
|
private ExportFolderEntity exportFolder;
|
||||||
|
|
||||||
|
@Column(name = "created_at", nullable = false, updatable = false)
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
@PrePersist
|
||||||
|
public void onCreate() {
|
||||||
|
createdAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
public class NotificationType {
|
public enum NotificationType {
|
||||||
|
EMAIL,
|
||||||
|
SMS,
|
||||||
|
WEB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,10 @@ import lombok.RequiredArgsConstructor;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public enum Permission {
|
public enum Permission {
|
||||||
|
|
||||||
|
ADMIN_PLATFORM_READ("admin_platform:read"),
|
||||||
|
ADMIN_PLATFORM_UPDATE("admin_platform:update"),
|
||||||
|
ADMIN_PLATFORM_DELETE("admin_platform:create"),
|
||||||
|
ADMIN_PLATFORM_CREATE("admin_platform:delete"),
|
||||||
ADMIN_READ("admin:read"),
|
ADMIN_READ("admin:read"),
|
||||||
ADMIN_UPDATE("admin:update"),
|
ADMIN_UPDATE("admin:update"),
|
||||||
ADMIN_CREATE("admin:create"),
|
ADMIN_CREATE("admin:create"),
|
||||||
|
|||||||
@ -1,4 +1,43 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.experimental.FieldDefaults;
|
||||||
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@FieldNameConstants
|
||||||
|
@FieldDefaults( level = AccessLevel.PRIVATE)
|
||||||
|
@Table(name = "quote_details")
|
||||||
public class QuoteDetailEntity {
|
public class QuoteDetailEntity {
|
||||||
}
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Column(name = "quantity")
|
||||||
|
private Integer quantity;
|
||||||
|
|
||||||
|
@OneToOne(cascade = CascadeType.ALL)
|
||||||
|
@JoinColumn(name = "dimension_id", referencedColumnName = "id")
|
||||||
|
private DimensionEntity dimension;
|
||||||
|
|
||||||
|
@Column(name = "weight")
|
||||||
|
private Double weight;
|
||||||
|
|
||||||
|
@Column(name = "gerbable")
|
||||||
|
private boolean gerbable;
|
||||||
|
|
||||||
|
// Relation Many-to-One avec Quote
|
||||||
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
|
@JoinColumn(name = "quote_id", nullable = false)
|
||||||
|
private QuoteEntity quote;
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,25 +1,110 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.experimental.FieldDefaults;
|
||||||
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@FieldNameConstants
|
||||||
|
@FieldDefaults( level = AccessLevel.PRIVATE)
|
||||||
|
@Table(name = "Quote")
|
||||||
public class QuoteEntity extends BaseEntity {
|
public class QuoteEntity extends BaseEntity {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.UUID)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Column(unique = true, nullable = false)
|
// General Information
|
||||||
|
@Column(name = "packager")
|
||||||
|
private String packager;
|
||||||
|
|
||||||
|
@Column(unique = true)
|
||||||
private String reference;
|
private String reference;
|
||||||
|
|
||||||
@Column(nullable = false)
|
//Douane
|
||||||
private String status;
|
@Column(name = "customs_import_export")
|
||||||
|
private String customsImportExport;
|
||||||
|
|
||||||
private BigDecimal estimatedAmount;
|
@Column(name = "eur1")
|
||||||
|
private Boolean eur1;
|
||||||
|
|
||||||
private LocalDateTime createdAt = LocalDateTime.now();
|
@Column(name = "packaging_type")
|
||||||
|
private String packagingType;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "quote", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||||
|
private List<QuoteDetailEntity> details = new ArrayList<>();
|
||||||
|
|
||||||
|
@Column(name = "dangerous_goods")
|
||||||
|
private Boolean dangerousGoods;
|
||||||
|
|
||||||
|
@Column(name = "tailgate")
|
||||||
|
private Boolean tailgate;
|
||||||
|
|
||||||
|
@Column(name = "straps")
|
||||||
|
private Boolean straps;
|
||||||
|
|
||||||
|
@Column(name = "thermal_cover")
|
||||||
|
private Boolean thermalCover;
|
||||||
|
|
||||||
|
@Column(name = "regulated_products")
|
||||||
|
private Boolean regulatedProducts;
|
||||||
|
|
||||||
|
@Column(name = "appointment_required")
|
||||||
|
private Boolean appointmentRequired;
|
||||||
|
|
||||||
|
@Column(name = "t1")
|
||||||
|
private Boolean t1;
|
||||||
|
|
||||||
|
@Column(name = "customs_stop")
|
||||||
|
private Boolean customsStop;
|
||||||
|
|
||||||
|
@Column(name = "export_assistance")
|
||||||
|
private Boolean exportAssistance;
|
||||||
|
|
||||||
|
@Column(name = "insurance")
|
||||||
|
private Boolean insurance;
|
||||||
|
|
||||||
|
@Column(name = "operation_type")
|
||||||
|
private String operationType;
|
||||||
|
|
||||||
|
@Column(name = "incoterm")
|
||||||
|
private String incoterm;
|
||||||
|
|
||||||
|
@Column(name = "departure_postal_code")
|
||||||
|
private String departurePostalCode;
|
||||||
|
|
||||||
|
@Column(name = "departure_city")
|
||||||
|
private String departureCity;
|
||||||
|
|
||||||
|
@Column(name = "pickup_date")
|
||||||
|
private LocalDate pickupDate;
|
||||||
|
|
||||||
|
@Column(name = "arrival_postal_code")
|
||||||
|
private String arrivalPostalCode;
|
||||||
|
|
||||||
|
@Column(name = "arrival_city")
|
||||||
|
private String arrivalCity;
|
||||||
|
|
||||||
|
@Column(name = "delivery_date")
|
||||||
|
private LocalDate deliveryDate;
|
||||||
|
|
||||||
|
@Column(name = "created_at", updatable = false)
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
@Column(name = "modified_at")
|
||||||
|
private LocalDateTime modifiedAt;
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private UserEntity user;
|
private UserEntity user;
|
||||||
@ -29,5 +114,16 @@ public class QuoteEntity extends BaseEntity {
|
|||||||
|
|
||||||
@OneToOne(mappedBy = "quote", cascade = CascadeType.ALL)
|
@OneToOne(mappedBy = "quote", cascade = CascadeType.ALL)
|
||||||
private ExportFolderEntity exportFile;
|
private ExportFolderEntity exportFile;
|
||||||
|
|
||||||
|
@PrePersist
|
||||||
|
public void onCreate() {
|
||||||
|
createdAt = LocalDateTime.now();
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreUpdate
|
||||||
|
public void onUpdate() {
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,21 @@ public enum Role {
|
|||||||
MANAGER_READ,
|
MANAGER_READ,
|
||||||
MANAGER_UPDATE,
|
MANAGER_UPDATE,
|
||||||
MANAGER_DELETE,
|
MANAGER_DELETE,
|
||||||
MANAGER_CREATE));
|
MANAGER_CREATE)),
|
||||||
|
ADMIN_PLATFORM(Set.of(
|
||||||
|
ADMIN_PLATFORM_READ,
|
||||||
|
ADMIN_PLATFORM_UPDATE,
|
||||||
|
ADMIN_PLATFORM_DELETE,
|
||||||
|
ADMIN_PLATFORM_CREATE,
|
||||||
|
ADMIN_READ,
|
||||||
|
ADMIN_UPDATE,
|
||||||
|
ADMIN_DELETE,
|
||||||
|
ADMIN_CREATE,
|
||||||
|
MANAGER_READ,
|
||||||
|
MANAGER_UPDATE,
|
||||||
|
MANAGER_DELETE,
|
||||||
|
MANAGER_CREATE)
|
||||||
|
);
|
||||||
|
|
||||||
private final Set<Permission> permissions;
|
private final Set<Permission> permissions;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,79 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.experimental.FieldDefaults;
|
||||||
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@FieldNameConstants
|
||||||
|
@FieldDefaults( level = AccessLevel.PRIVATE)
|
||||||
|
@Table(name = "shipment_tracking")
|
||||||
public class ShipmentTrackingEntity {
|
public class ShipmentTrackingEntity {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Column(name = "container_number")
|
||||||
|
private String containerNumber;
|
||||||
|
|
||||||
|
@Column(name = "imo_number")
|
||||||
|
private String imoNumber;
|
||||||
|
|
||||||
|
@Column(name = "mmsi_number")
|
||||||
|
private String mmsiNumber;
|
||||||
|
|
||||||
|
@Column(name = "vessel_name")
|
||||||
|
private String vesselName;
|
||||||
|
|
||||||
|
@Column(name = "current_latitude")
|
||||||
|
private Double currentLatitude;
|
||||||
|
|
||||||
|
@Column(name = "current_longitude")
|
||||||
|
private Double currentLongitude;
|
||||||
|
|
||||||
|
@Column(name = "speed_knots")
|
||||||
|
private Double speedKnots;
|
||||||
|
|
||||||
|
@Column(name = "status")
|
||||||
|
private String status; // e.g. "Underway", "Moored", etc.
|
||||||
|
|
||||||
|
@Column(name = "eta")
|
||||||
|
private LocalDateTime eta;
|
||||||
|
|
||||||
|
@Column(name = "last_reported")
|
||||||
|
private LocalDateTime lastReported;
|
||||||
|
|
||||||
|
// Relation avec ExportFolder
|
||||||
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
|
@JoinColumn(name = "export_folder_id", nullable = false)
|
||||||
|
private ExportFolderEntity exportFolder;
|
||||||
|
|
||||||
|
@Column(name = "created_at", nullable = false, updatable = false)
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
@Column(name = "modified_at")
|
||||||
|
private LocalDateTime modifiedAt;
|
||||||
|
|
||||||
|
@PrePersist
|
||||||
|
public void onCreate() {
|
||||||
|
createdAt = LocalDateTime.now();
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
lastReported = LocalDateTime.now();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreUpdate
|
||||||
|
public void onUpdate() {
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,21 +1,16 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.*;
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.Setter;
|
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
|
@Table(name = "Token", uniqueConstraints = @UniqueConstraint(columnNames = "token"))
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Table(name = "token", uniqueConstraints = {
|
|
||||||
@UniqueConstraint(columnNames = {"token"})
|
|
||||||
})
|
|
||||||
public class TokenEntity extends BaseEntity {
|
public class TokenEntity extends BaseEntity {
|
||||||
|
|
||||||
public enum Type {
|
public enum Type {
|
||||||
@ -29,7 +24,6 @@ public class TokenEntity extends BaseEntity {
|
|||||||
private Type tokenType = Type.BEARER;
|
private Type tokenType = Type.BEARER;
|
||||||
|
|
||||||
private boolean revoked;
|
private boolean revoked;
|
||||||
|
|
||||||
private boolean expired;
|
private boolean expired;
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
|
|||||||
@ -1,18 +1,27 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import lombok.experimental.FieldDefaults;
|
||||||
|
import lombok.experimental.FieldNameConstants;
|
||||||
import org.hibernate.annotations.NaturalId;
|
import org.hibernate.annotations.NaturalId;
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@FieldNameConstants
|
||||||
|
@FieldDefaults( level = AccessLevel.PRIVATE)
|
||||||
|
@Table(name = "Users")
|
||||||
public class UserEntity extends BaseEntity implements UserDetails {
|
public class UserEntity extends BaseEntity implements UserDetails {
|
||||||
|
|
||||||
@NaturalId
|
@NaturalId
|
||||||
@ -31,6 +40,9 @@ public class UserEntity extends BaseEntity implements UserDetails {
|
|||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
@Column(name = "phone", length = 20)
|
||||||
|
private String phone;
|
||||||
|
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
private Role role;
|
private Role role;
|
||||||
@ -50,14 +62,21 @@ public class UserEntity extends BaseEntity implements UserDetails {
|
|||||||
@OneToMany(mappedBy = "user")
|
@OneToMany(mappedBy = "user")
|
||||||
private List<TokenEntity> tokens;
|
private List<TokenEntity> tokens;
|
||||||
|
|
||||||
@Override
|
@Column(name = "created_at", updatable = false)
|
||||||
public String getPassword() {
|
private LocalDateTime createdAt;
|
||||||
return password;
|
|
||||||
|
@Column(name = "modified_at")
|
||||||
|
private LocalDateTime modifiedAt;
|
||||||
|
|
||||||
|
@PrePersist
|
||||||
|
public void onCreate() {
|
||||||
|
createdAt = LocalDateTime.now();
|
||||||
|
modifiedAt = LocalDateTime.now();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@PreUpdate
|
||||||
public String getUsername() {
|
public void onUpdate() {
|
||||||
return username;
|
modifiedAt = LocalDateTime.now();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -87,8 +106,9 @@ public class UserEntity extends BaseEntity implements UserDetails {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "UserEntity(" + super.toString() + String.format("username=%s, firstName=%s, lastName=%s, email=%s, role=%s)",
|
return "UserEntity(" + super.toString() + String.format(
|
||||||
username, firstName, lastName, email, role.name());
|
"username=%s, firstName=%s, lastName=%s, email=%s, role=%s)",
|
||||||
|
username, firstName, lastName, email, role.name()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,58 @@
|
|||||||
package com.dh7789dev.xpeditis.entity;
|
package com.dh7789dev.xpeditis.entity;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.experimental.FieldDefaults;
|
||||||
|
import lombok.experimental.FieldNameConstants;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@FieldNameConstants
|
||||||
|
@FieldDefaults( level = AccessLevel.PRIVATE)
|
||||||
|
@Table(name = "vessel_schedule")
|
||||||
public class VesselScheduleEntity {
|
public class VesselScheduleEntity {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Column(name = "imo_number") // Numéro unique du navire
|
||||||
|
private String imoNumber;
|
||||||
|
|
||||||
|
@Column(name = "mmsi_number") // Maritime Mobile Service Identity
|
||||||
|
private String mmsiNumber;
|
||||||
|
|
||||||
|
@Column(name = "vessel_name")
|
||||||
|
private String vesselName;
|
||||||
|
|
||||||
|
@Column(name = "voyage_number")
|
||||||
|
private String voyageNumber;
|
||||||
|
|
||||||
|
@Column(name = "departure_port")
|
||||||
|
private String departurePort;
|
||||||
|
|
||||||
|
@Column(name = "arrival_port")
|
||||||
|
private String arrivalPort;
|
||||||
|
|
||||||
|
@Column(name = "departure_date")
|
||||||
|
private LocalDateTime departureDate;
|
||||||
|
|
||||||
|
@Column(name = "arrival_date")
|
||||||
|
private LocalDateTime arrivalDate;
|
||||||
|
|
||||||
|
@Column(name = "last_updated")
|
||||||
|
private LocalDateTime lastUpdated;
|
||||||
|
|
||||||
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
|
@JoinColumn(name = "export_folder_id", nullable = false)
|
||||||
|
private ExportFolderEntity exportFolder;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.dh7789dev.xpeditis.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.dh7789dev.xpeditis.dto.app.Address;
|
||||||
|
import com.dh7789dev.xpeditis.entity.AddressEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.MappingConstants;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
@Mapper(componentModel = MappingConstants.ComponentModel.SPRING, uses = { CompanyMapper.class })
|
||||||
|
public interface AddressMapper {
|
||||||
|
|
||||||
|
AddressMapper INSTANCE = Mappers.getMapper(AddressMapper.class);
|
||||||
|
|
||||||
|
AddressEntity addressToAddressEntity(Address address);
|
||||||
|
|
||||||
|
Address addressEntityToAddress(AddressEntity addressEntity);
|
||||||
|
}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis.mapper;
|
package com.dh7789dev.xpeditis.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.dto.Company;
|
import com.dh7789dev.xpeditis.dto.app.Company;
|
||||||
import com.dh7789dev.xpeditis.entity.CompanyEntity;
|
import com.dh7789dev.xpeditis.entity.CompanyEntity;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
|
|||||||
@ -1,4 +1,17 @@
|
|||||||
package com.dh7789dev.xpeditis.mapper;
|
package com.dh7789dev.xpeditis.mapper;
|
||||||
|
|
||||||
public class DimensionMapper {
|
|
||||||
|
import com.dh7789dev.xpeditis.dto.app.Dimension;
|
||||||
|
import com.dh7789dev.xpeditis.entity.DimensionEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
@Mapper(componentModel = "spring")
|
||||||
|
public interface DimensionMapper {
|
||||||
|
DimensionMapper INSTANCE = Mappers.getMapper(DimensionMapper.class);
|
||||||
|
|
||||||
|
DimensionEntity dimensionToDimensionEntity(Dimension dimension);
|
||||||
|
|
||||||
|
Dimension dimensionEntityToDimension(DimensionEntity dimensionEntity);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,16 @@
|
|||||||
package com.dh7789dev.xpeditis.mapper;
|
package com.dh7789dev.xpeditis.mapper;
|
||||||
|
|
||||||
|
import com.dh7789dev.xpeditis.dto.app.Document;
|
||||||
|
import com.dh7789dev.xpeditis.entity.DocumentEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
@Mapper(componentModel = "spring")
|
||||||
public interface DocumentMapper {
|
public interface DocumentMapper {
|
||||||
|
DocumentMapper INSTANCE = Mappers.getMapper(DocumentMapper.class);
|
||||||
|
|
||||||
|
DocumentEntity documentToDocumentEntity(Document document);
|
||||||
|
Document documentEntityToDocument(DocumentEntity documentEntity);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
package com.dh7789dev.xpeditis.mapper;
|
package com.dh7789dev.xpeditis.mapper;
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.dto.ExportFolder;
|
import com.dh7789dev.xpeditis.dto.app.ExportFolder;
|
||||||
import com.dh7789dev.xpeditis.entity.ExportFolderEntity;
|
import com.dh7789dev.xpeditis.entity.ExportFolderEntity;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.MappingConstants;
|
import org.mapstruct.MappingConstants;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
@Mapper(componentModel = MappingConstants.ComponentModel.SPRING)
|
@Mapper(componentModel = MappingConstants.ComponentModel.SPRING, uses = { DocumentMapper.class, CompanyMapper.class })
|
||||||
public interface ExportFolderMapper {
|
public interface ExportFolderMapper {
|
||||||
ExportFolderMapper INSTANCE = Mappers.getMapper(ExportFolderMapper.class);
|
ExportFolderMapper INSTANCE = Mappers.getMapper(ExportFolderMapper.class);
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package com.dh7789dev.xpeditis.mapper;
|
package com.dh7789dev.xpeditis.mapper;
|
||||||
|
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.dto.License;
|
import com.dh7789dev.xpeditis.dto.app.License;
|
||||||
import com.dh7789dev.xpeditis.entity.LicenseEntity;
|
import com.dh7789dev.xpeditis.entity.LicenseEntity;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
|
|||||||
@ -1,4 +1,18 @@
|
|||||||
package com.dh7789dev.xpeditis.mapper;
|
package com.dh7789dev.xpeditis.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.dh7789dev.xpeditis.dto.app.Notification;
|
||||||
|
import com.dh7789dev.xpeditis.entity.NotificationEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
|
||||||
|
@Mapper(componentModel = "spring" , uses = { ExportFolderMapper.class })
|
||||||
public interface NotificationMapper {
|
public interface NotificationMapper {
|
||||||
}
|
NotificationMapper INSTANCE = Mappers.getMapper(NotificationMapper.class);
|
||||||
|
|
||||||
|
NotificationEntity notificationToNotificationEntity(Notification notification);
|
||||||
|
|
||||||
|
Notification notificationEntityToNotification(NotificationEntity notificationEntity);
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,4 +1,19 @@
|
|||||||
package com.dh7789dev.xpeditis.mapper;
|
package com.dh7789dev.xpeditis.mapper;
|
||||||
|
|
||||||
|
import com.dh7789dev.xpeditis.dto.app.QuoteDetail;
|
||||||
|
import com.dh7789dev.xpeditis.entity.QuoteDetailEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.Mapping;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
@Mapper(componentModel = "spring", uses = { DimensionMapper.class })
|
||||||
public interface QuoteDetailMapper {
|
public interface QuoteDetailMapper {
|
||||||
|
QuoteDetailMapper INSTANCE = Mappers.getMapper(QuoteDetailMapper.class);
|
||||||
|
|
||||||
|
@Mapping(source = "quoteId", target = "quote.id")
|
||||||
|
QuoteDetailEntity quoteDetailsToQuoteDetailsEntity(QuoteDetail quoteDetail);
|
||||||
|
|
||||||
|
@Mapping(source = "quote.id", target = "quoteId")
|
||||||
|
QuoteDetail quoteDetailsEntityToQuoteDetails(QuoteDetailEntity quoteDetailEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
package com.dh7789dev.xpeditis.mapper;
|
package com.dh7789dev.xpeditis.mapper;
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.dto.Quote;
|
import com.dh7789dev.xpeditis.dto.app.Quote;
|
||||||
import com.dh7789dev.xpeditis.entity.QuoteEntity;
|
import com.dh7789dev.xpeditis.entity.QuoteEntity;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
import org.mapstruct.MappingConstants;
|
import org.mapstruct.MappingConstants;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
@Mapper(componentModel = MappingConstants.ComponentModel.SPRING)
|
@Mapper(componentModel = MappingConstants.ComponentModel.SPRING, uses = { QuoteDetailMapper.class })
|
||||||
public interface QuoteMapper {
|
public interface QuoteMapper {
|
||||||
QuoteMapper INSTANCE = Mappers.getMapper(QuoteMapper.class);
|
QuoteMapper INSTANCE = Mappers.getMapper(QuoteMapper.class);
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,17 @@
|
|||||||
package com.dh7789dev.xpeditis.mapper;
|
package com.dh7789dev.xpeditis.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.dh7789dev.xpeditis.dto.app.ShipmentTracking;
|
||||||
|
import com.dh7789dev.xpeditis.entity.ShipmentTrackingEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
@Mapper(componentModel = "spring", uses = { ExportFolderMapper.class })
|
||||||
public interface ShipmentTrackingMapper {
|
public interface ShipmentTrackingMapper {
|
||||||
}
|
|
||||||
|
ShipmentTrackingMapper INSTANCE = Mappers.getMapper(ShipmentTrackingMapper.class);
|
||||||
|
|
||||||
|
ShipmentTrackingEntity shipmentTrackingToShipmentTrackingEntity(ShipmentTracking shipmentTracking);
|
||||||
|
|
||||||
|
ShipmentTracking shipmentTrackingEntityToShipmentTracking(ShipmentTrackingEntity shipmentTrackingEntity);
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package com.dh7789dev.xpeditis.mapper;
|
package com.dh7789dev.xpeditis.mapper;
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.dto.UserAccount;
|
import com.dh7789dev.xpeditis.dto.app.UserAccount;
|
||||||
import com.dh7789dev.xpeditis.entity.UserEntity;
|
import com.dh7789dev.xpeditis.entity.UserEntity;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.Mapping;
|
import org.mapstruct.Mapping;
|
||||||
|
|||||||
@ -1,4 +1,17 @@
|
|||||||
package com.dh7789dev.xpeditis.mapper;
|
package com.dh7789dev.xpeditis.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.dh7789dev.xpeditis.dto.app.VesselSchedule;
|
||||||
|
import com.dh7789dev.xpeditis.entity.VesselScheduleEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
@Mapper(componentModel = "spring", uses = { ExportFolderMapper.class })
|
||||||
public interface VesselScheduleMapper {
|
public interface VesselScheduleMapper {
|
||||||
|
|
||||||
|
VesselScheduleMapper INSTANCE = Mappers.getMapper(VesselScheduleMapper.class);
|
||||||
|
|
||||||
|
VesselScheduleEntity vesselScheduleToVesselScheduleEntity(VesselSchedule vesselSchedule);
|
||||||
|
|
||||||
|
VesselSchedule vesselScheduleEntityToVesselSchedule(VesselScheduleEntity vesselScheduleEntity);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,10 @@
|
|||||||
package com.dh7789dev.xpeditis.repository;
|
package com.dh7789dev.xpeditis.repository;
|
||||||
|
|
||||||
public class AddressJpaRepository {
|
import com.dh7789dev.xpeditis.AddressRepository;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Repository
|
||||||
|
public class AddressJpaRepository implements AddressRepository {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
package com.dh7789dev.xpeditis.repository;
|
package com.dh7789dev.xpeditis.repository;
|
||||||
|
|
||||||
import com.dh7789dev.xpeditis.AuthenticationRepository;
|
import com.dh7789dev.xpeditis.AuthenticationRepository;
|
||||||
|
import com.dh7789dev.xpeditis.dao.CompanyDao;
|
||||||
import com.dh7789dev.xpeditis.dao.TokenDao;
|
import com.dh7789dev.xpeditis.dao.TokenDao;
|
||||||
import com.dh7789dev.xpeditis.dao.UserDao;
|
import com.dh7789dev.xpeditis.dao.UserDao;
|
||||||
import com.dh7789dev.xpeditis.dto.AuthenticationRequest;
|
import com.dh7789dev.xpeditis.dto.request.AuthenticationRequest;
|
||||||
import com.dh7789dev.xpeditis.dto.AuthenticationResponse;
|
import com.dh7789dev.xpeditis.dto.response.AuthenticationResponse;
|
||||||
import com.dh7789dev.xpeditis.entity.TokenEntity;
|
import com.dh7789dev.xpeditis.dto.request.RegisterRequest;
|
||||||
import com.dh7789dev.xpeditis.entity.UserEntity;
|
import com.dh7789dev.xpeditis.entity.*;
|
||||||
import com.dh7789dev.xpeditis.util.JwtUtil;
|
import com.dh7789dev.xpeditis.util.JwtUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -14,6 +15,7 @@ import org.springframework.security.authentication.AuthenticationManager;
|
|||||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||||
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ -25,6 +27,8 @@ public class AuthenticationJwtRepository implements AuthenticationRepository {
|
|||||||
private final UserDao userDao;
|
private final UserDao userDao;
|
||||||
private final TokenDao tokenDao;
|
private final TokenDao tokenDao;
|
||||||
private final JwtUtil jwtUtil;
|
private final JwtUtil jwtUtil;
|
||||||
|
private final PasswordEncoder passwordEncoder;
|
||||||
|
private final CompanyDao companyDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AuthenticationResponse authenticate(AuthenticationRequest request) {
|
public AuthenticationResponse authenticate(AuthenticationRequest request) {
|
||||||
@ -53,6 +57,32 @@ public class AuthenticationJwtRepository implements AuthenticationRepository {
|
|||||||
.setExpiresAt(jwtUtil.extractExpiration(jwtToken));
|
.setExpiresAt(jwtUtil.extractExpiration(jwtToken));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AuthenticationResponse register(RegisterRequest request) {
|
||||||
|
if (userDao.existsByUsername(request.getUsername())) {
|
||||||
|
return new AuthenticationResponse().setError("Cette Utilisateur existe deja");
|
||||||
|
}
|
||||||
|
UserEntity userEntity = new UserEntity();
|
||||||
|
userEntity.setFirstName(request.getFirstName());
|
||||||
|
userEntity.setLastName(request.getLastName());
|
||||||
|
userEntity.setPassword(passwordEncoder.encode(request.getPassword()));
|
||||||
|
userEntity.setEmail(request.getEmail());
|
||||||
|
userEntity.setUsername(request.getUsername());
|
||||||
|
userEntity.setEnabled(true);
|
||||||
|
if(request.getCompany_uuid().isEmpty()){
|
||||||
|
userEntity.setRole(Role.ADMIN);
|
||||||
|
CompanyEntity companyEntity = new CompanyEntity();
|
||||||
|
companyEntity.setName(request.getCompany_name());
|
||||||
|
companyDao.save(companyEntity);
|
||||||
|
} else {
|
||||||
|
userEntity.setRole(Role.ADMIN);
|
||||||
|
}
|
||||||
|
userDao.save(userEntity);
|
||||||
|
AuthenticationRequest authenticationRequest = new AuthenticationRequest(request.getUsername(), request.getPassword());
|
||||||
|
return authenticate(authenticationRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void saveUserToken(UserEntity user, String jwtToken) {
|
private void saveUserToken(UserEntity user, String jwtToken) {
|
||||||
var tokenEntity = new TokenEntity()
|
var tokenEntity = new TokenEntity()
|
||||||
.setUser(user)
|
.setUser(user)
|
||||||
|
|||||||
@ -1,4 +1,10 @@
|
|||||||
package com.dh7789dev.xpeditis.repository;
|
package com.dh7789dev.xpeditis.repository;
|
||||||
|
|
||||||
public class CompanyJpaRepository {
|
import com.dh7789dev.xpeditis.CompanyRepository;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Repository
|
||||||
|
public class CompanyJpaRepository implements CompanyRepository {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,11 @@
|
|||||||
package com.dh7789dev.xpeditis.repository;
|
package com.dh7789dev.xpeditis.repository;
|
||||||
|
|
||||||
public class DimensionJpaRepository {
|
|
||||||
|
import com.dh7789dev.xpeditis.DimensionRepository;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Repository
|
||||||
|
public class DimensionJpaRepository implements DimensionRepository {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,10 @@
|
|||||||
package com.dh7789dev.xpeditis.repository;
|
package com.dh7789dev.xpeditis.repository;
|
||||||
|
|
||||||
public class DocumentJpaRepository {
|
import com.dh7789dev.xpeditis.DocumentRepository;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Repository
|
||||||
|
public class DocumentJpaRepository implements DocumentRepository {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,10 @@
|
|||||||
package com.dh7789dev.xpeditis.repository;
|
package com.dh7789dev.xpeditis.repository;
|
||||||
|
|
||||||
public class ExportFolderJpaRepository {
|
import com.dh7789dev.xpeditis.ExportFolderRepository;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Repository
|
||||||
|
public class ExportFolderJpaRepository implements ExportFolderRepository {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,10 @@
|
|||||||
package com.dh7789dev.xpeditis.repository;
|
package com.dh7789dev.xpeditis.repository;
|
||||||
|
|
||||||
public class LicenseJpaRepository {
|
import com.dh7789dev.xpeditis.LicenseRepository;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Repository
|
||||||
|
public class LicenseJpaRepository implements LicenseRepository {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,10 @@
|
|||||||
package com.dh7789dev.xpeditis.repository;
|
package com.dh7789dev.xpeditis.repository;
|
||||||
|
|
||||||
public class NotificationJpaRepository {
|
import com.dh7789dev.xpeditis.NotificationRepository;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Repository
|
||||||
|
public class NotificationJpaRepository implements NotificationRepository {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,11 @@
|
|||||||
package com.dh7789dev.xpeditis.repository;
|
package com.dh7789dev.xpeditis.repository;
|
||||||
|
|
||||||
public class QuoteDetailsJpaRepository {
|
|
||||||
|
import com.dh7789dev.xpeditis.QuoteDetailsRepository;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Repository
|
||||||
|
public class QuoteDetailsJpaRepository implements QuoteDetailsRepository {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,10 @@
|
|||||||
package com.dh7789dev.xpeditis.repository;
|
package com.dh7789dev.xpeditis.repository;
|
||||||
|
|
||||||
public class QuoteJpaRepository {
|
import com.dh7789dev.xpeditis.QuoteRepository;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Repository
|
||||||
|
public class QuoteJpaRepository implements QuoteRepository {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,10 @@
|
|||||||
package com.dh7789dev.xpeditis.repository;
|
package com.dh7789dev.xpeditis.repository;
|
||||||
|
|
||||||
public class ShipmentTrackingJpaRepository {
|
import com.dh7789dev.xpeditis.ShipmentTrackingRepository;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Repository
|
||||||
|
public class ShipmentTrackingJpaRepository implements ShipmentTrackingRepository {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@ package com.dh7789dev.xpeditis.repository;
|
|||||||
|
|
||||||
import com.dh7789dev.xpeditis.UserRepository;
|
import com.dh7789dev.xpeditis.UserRepository;
|
||||||
import com.dh7789dev.xpeditis.dao.UserDao;
|
import com.dh7789dev.xpeditis.dao.UserDao;
|
||||||
import com.dh7789dev.xpeditis.dto.ChangePasswordRequest;
|
import com.dh7789dev.xpeditis.dto.request.ChangePasswordRequest;
|
||||||
import com.dh7789dev.xpeditis.entity.UserEntity;
|
import com.dh7789dev.xpeditis.entity.UserEntity;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||||
|
|||||||
@ -1,4 +1,10 @@
|
|||||||
package com.dh7789dev.xpeditis.repository;
|
package com.dh7789dev.xpeditis.repository;
|
||||||
|
|
||||||
public class VesselScheduleJpaRepository {
|
import com.dh7789dev.xpeditis.VesselScheduleRepository;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Repository
|
||||||
|
public class VesselScheduleJpaRepository implements VesselScheduleRepository {
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user