FIX Structure of Project

This commit is contained in:
David 2025-08-09 15:49:59 +02:00
parent c013aed58f
commit 758e71ad5e
85 changed files with 356 additions and 63 deletions

View File

@ -1,39 +0,0 @@
-- === Companies ===
INSERT INTO company_entity (id, name, country)
VALUES
(1, 'Global Logistics', 'France'),
(2, 'TransWorld Exports', 'Germany');
-- === Users ===
INSERT INTO user_entity (id, username, first_name, last_name, email, password, role, enabled, company_id)
VALUES
(1, 'admin1', 'Alice', 'Martin', 'alice@globallogistics.com', '$2a$10$hash1', 'ADMIN', true, 1),
(2, 'user1', 'Bob', 'Dupont', 'bob@globallogistics.com', '$2a$10$hash2', 'USER', true, 1),
(3, 'admin2', 'Eva', 'Schmidt', 'eva@transworld.com', '$2a$10$hash3', 'ADMIN', true, 2);
-- === Licenses ===
INSERT INTO license_entity (id, license_key, expiration_date, active, user_id)
VALUES
(1, 'LIC-GL-A', '2025-12-31', true, 1),
(2, 'LIC-GL-B', '2025-12-31', true, 2),
(3, 'LIC-TW-A', '2025-11-30', true, 3);
-- === Quotes ===
INSERT INTO quote_entity (id, reference, status, estimated_amount, created_at, user_id, company_id)
VALUES
('550e8400-e29b-41d4-a716-446655440000', 'QT-GL-001', 'PENDING', 1200.50, CURRENT_TIMESTAMP, 1, 1),
('550e8400-e29b-41d4-a716-446655440001', 'QT-GL-002', 'VALIDATED', 2300.75, CURRENT_TIMESTAMP, 2, 1),
('550e8400-e29b-41d4-a716-446655440002', 'QT-TW-001', 'VALIDATED', 1950.00, CURRENT_TIMESTAMP, 3, 2);
-- === Export Folders ===
INSERT INTO export_folder_entity (id, reference, validation_date, company_id, quote_id)
VALUES
(1, 'EXP-GL-002', CURRENT_TIMESTAMP, 1, '550e8400-e29b-41d4-a716-446655440001'),
(2, 'EXP-TW-001', CURRENT_TIMESTAMP, 2, '550e8400-e29b-41d4-a716-446655440002');
-- === Tokens ===
INSERT INTO token (id, token, token_type, revoked, expired, user_id)
VALUES
(1, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9-admin1', 'BEARER', false, false, 1),
(2, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9-user1', 'BEARER', false, false, 2),
(3, 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9-admin2', 'BEARER', false, false, 3);

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface AddressService {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface CompanyService {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface DimensionService {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface DocumentService {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface ExportFolderService {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public class LicenseService {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface NotificationService {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface QuoteDetailsService {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface QuoteService {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface ShipmentTrackingService {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface VesselScheduleService {
}

View File

@ -1,22 +0,0 @@
package com.dh7789dev.xpeditis.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
@AllArgsConstructor
public class Quote {
private Long id;
private String reference;
private String status;
private BigDecimal estimatedAmount;
private LocalDateTime createdAt = LocalDateTime.now();
private UserAccount user;
private Company company;
private ExportFolder exportFile;
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.dto.app;
public class Address {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.dto;
public class Dimension {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.dto.app;
public class Document {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.dto.app;
public class Notification {
}

View File

@ -0,0 +1,41 @@
package com.dh7789dev.xpeditis.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.time.LocalDate;
import java.util.List;
@Data
@AllArgsConstructor
public class Quote {
private Long id;
private String packager;
private String customsImportExport;
private Boolean eur1;
private String packagingType;
private List<QuoteDetail> details;
private Boolean dangerousGoods;
private Boolean tailgate;
private Boolean straps;
private Boolean thermalCover;
private Boolean regulatedProducts;
private Boolean appointmentRequired;
private Boolean t1;
private Boolean customsStop;
private Boolean exportAssistance;
private Boolean insurance;
private String operationType;
private String incoterm;
private String departurePostalCode;
private String departureCity;
private LocalDate pickupDate;
private String arrivalPostalCode;
private String arrivalCity;
private LocalDate deliveryDate;
private UserAccount user;
private Company company;
private ExportFolder exportFile;
}

View File

@ -0,0 +1,16 @@
package com.dh7789dev.xpeditis.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
public class QuoteDetail {
private Long id;
private Integer quantity;
private DimensionDTO dimension;
private Double weight;
private boolean stackable;
private Long quoteId;
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.dto.app;
public class ShipmentTracking {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.dto.app;
public class VesselSchedule {
}

View File

@ -31,7 +31,11 @@ public class RegisterRequest {
String password; String password;
@NotBlank @NotBlank
String role; // Should be "USER" or "ADMIN" String phone;
String company_uuid = "";
String company_name;
} }

View File

@ -1,5 +1,6 @@
package com.dh7789dev.xpeditis.dto; package com.dh7789dev.xpeditis.dto;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AccessLevel; import lombok.AccessLevel;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -15,6 +16,7 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@FieldDefaults(level = AccessLevel.PRIVATE) @FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true) @Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AuthenticationResponse { public class AuthenticationResponse {
@JsonProperty("access_token") @JsonProperty("access_token")
@ -28,4 +30,7 @@ public class AuthenticationResponse {
@JsonProperty("expires_at") @JsonProperty("expires_at")
Date expiresAt; Date expiresAt;
@JsonProperty("error_message")
String error;
} }

View File

@ -1,4 +1,4 @@
package com.dh7789dev.xpeditis.dto; package com.dh7789dev.xpeditis.dto.app;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AccessLevel; import lombok.AccessLevel;

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public class AddressServiceImpl {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public class CompanyServiceImpl {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public class DimensionServiceImpl {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public class DocumentServiceImpl {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public class ExportFolderServiceImpl {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public class LicenseServiceImpl {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public class NotificationServiceImpl {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public class QuoteDetailsServiceImpl {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public class QuoteServiceImpl {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public class ShipmentTrackingServiceImpl {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public class VesselScheduleServiceImpl {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface AddressRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface CompanyRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface DimensionRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface DocumentRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface ExportFolderRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface LicenseRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface NotificationRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface QuoteDetailsRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface QuoteRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface ShipmentTrackingRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis;
public interface VesselScheduleRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.dao;
public interface Address {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.dao;
public interface DimensionDao {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.dao;
public interface DocumentDao {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.dao;
public class NotificationDao {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.dao;
public interface QuoteDetailDao {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.dao;
public class ShipmentTrackingDao {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.dao;
public class VesselScheduleDao {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.entity;
public class AddressEntity {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.entity;
public enum AdresseType {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.entity;
public class DimensionEntity {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.entity;
public class DocumentEntity {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.entity;
public class NotificationEntity {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.entity;
public class NotificationType {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.entity;
public class QuoteDetailEntity {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.entity;
public class ShipmentTrackingEntity {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.entity;
public class VesselScheduleEntity {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.mapper;
public class DimensionMapper {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.mapper;
public interface DocumentMapper {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.mapper;
public interface NotificationMapper {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.mapper;
public interface QuoteDetailMapper {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.mapper;
public interface ShipmentTrackingMapper {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.mapper;
public interface VesselScheduleMapper {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.repository;
public class AddressJpaRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.repository;
public class CompanyJpaRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.repository;
public class DimensionJpaRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.repository;
public class DocumentJpaRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.repository;
public class ExportFolderJpaRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.repository;
public class LicenseJpaRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.repository;
public class NotificationJpaRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.repository;
public class QuoteDetailsJpaRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.repository;
public class QuoteJpaRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.repository;
public class ShipmentTrackingJpaRepository {
}

View File

@ -0,0 +1,4 @@
package com.dh7789dev.xpeditis.repository;
public class VesselScheduleJpaRepository {
}