Ergänzt die lesende Historien-API mit Verlaufsanzeige und ordnet Auftragskunden dem effektiven Zahler zu. Enthält VS-Code-Debugkonfiguration, Dokumentation und Regressionstests. Validiert mit Frontend-Build, 76 Backend-Tests und 25 Browsertests. Live-Datenbankprüfung wegen fehlender Erreichbarkeit offen.
62 lines
2.5 KiB
Java
62 lines
2.5 KiB
Java
package de.stadtbote.votian;
|
|
|
|
import java.math.BigDecimal;
|
|
import java.time.LocalDateTime;
|
|
import java.util.*;
|
|
|
|
/** API projections only. These classes neither define nor create database tables. */
|
|
public final class Models {
|
|
private Models() {}
|
|
public enum OrderStatus { DISPOSITION, OFFERED, IN_PROGRESS, COMPLETED, CANCELLED }
|
|
public enum StopType { PICKUP, DELIVERY, BOTH }
|
|
public enum CourierStatus { AVAILABLE, BUSY, OFFLINE }
|
|
public enum CancelMode { FREE, CHARGEABLE }
|
|
public static class Customer {
|
|
public Long id, version;
|
|
public String number, name, street, postalCode, city, contact, phone, email;
|
|
public Integer paymentDays;
|
|
public boolean active;
|
|
}
|
|
public static class Courier {
|
|
public Long id, version;
|
|
public String number, name, phone, vehicle, plate;
|
|
public CourierStatus status;
|
|
public boolean active;
|
|
}
|
|
public static class DeliveryOrder {
|
|
public Long id, version, customerId, payerCustomerId, ordererCustomerId, courierId, invoiceId;
|
|
public String customerName;
|
|
public String number;
|
|
public OrderStatus status;
|
|
public int legacyStatus, legacyStorno;
|
|
public long legacyService;
|
|
public boolean isCreditNote;
|
|
public String legacyStatusLabel;
|
|
public String service, vehicle;
|
|
public LocalDateTime pickupAt, deliveryDeadline;
|
|
public String reference, costCenter, notes;
|
|
public Integer packages;
|
|
public BigDecimal weight, distanceKm, netPrice, courierPrice, vatRate;
|
|
public String recipientName;
|
|
public LocalDateTime deliveredAt, createdAt, updatedAt;
|
|
public CancelMode cancelMode;
|
|
public List<Stop> stops = new ArrayList<>();
|
|
public List<History> history = new ArrayList<>();
|
|
}
|
|
public static class Stop {
|
|
public Long id;
|
|
public int sequence;
|
|
public StopType type;
|
|
public String name, street, postalCode, city, contact, phone, note;
|
|
public LocalDateTime completedAt;
|
|
public String recipientName;
|
|
}
|
|
public static class History {
|
|
public Long id;
|
|
public LocalDateTime at;
|
|
public String action, detail, actor;
|
|
}
|
|
public record Capabilities(boolean readOrders, boolean readCustomers, boolean readCouriers, boolean readInvoices,
|
|
boolean writeOrders, boolean writeCustomers, boolean writeCouriers, boolean writeInvoices, boolean completeStops, boolean exportOrders) {}
|
|
}
|