Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Claude Working Instructions

## Default Workflow

### 1. Think before acting
When the user raises a topic or problem, **think and plan first**. Do not immediately write code.

### 2. Create a ticket, not a fix
Unless the request is marked **urgent**, respond by:
- Briefly describing the problem and root cause
- Drafting a ticket in `docs/ISSUES-PHASE3.md` (or the appropriate phase file) following the existing format
- Stopping there — do not implement

### 3. Get approval before implementing
When ready to implement a ticket (urgent or approved), **brief the solution first**:
- What will change (files, entities, queries, tests)
- Any trade-offs or risks
- Wait for explicit approval before writing code

### 4. Test-driven development
Once approved, write **failing tests first** — only the tests necessary to prove correctness of the specific change, no more. Then implement until they pass.

---

## What counts as urgent
The user explicitly says: "do it now", "fix this", "urgent", or pastes a live error trace expecting an immediate fix.

## Ticket format
Follow the structure in `docs/ISSUES-PHASE3.md`: description paragraph, named sections, `**Acceptance criteria:**` checklist.
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@
<optional>true</optional>
</dependency>

<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>

<!-- Test -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/** Payload for adding a new owner to a vessel. */
@Getter
@Setter
@NoArgsConstructor
public class AddVesselOwnerRequest {

@NotBlank(message = "Owner name is required")
Expand All @@ -21,28 +27,4 @@ public class AddVesselOwnerRequest {
@DecimalMin(value = "0.01", message = "Share percent must be greater than 0")
@DecimalMax(value = "100.00", message = "Share percent must not exceed 100")
private BigDecimal sharePercent;

public String getOwnerName() {
return ownerName;
}

public void setOwnerName(String ownerName) {
this.ownerName = ownerName;
}

public String getOwnerEmail() {
return ownerEmail;
}

public void setOwnerEmail(String ownerEmail) {
this.ownerEmail = ownerEmail;
}

public BigDecimal getSharePercent() {
return sharePercent;
}

public void setSharePercent(BigDecimal sharePercent) {
this.sharePercent = sharePercent;
}
}
38 changes: 6 additions & 32 deletions src/main/java/com/shipping/freightops/dto/AgentCreateRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
import com.shipping.freightops.enums.AgentType;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
public class AgentCreateRequest {

@NotBlank private String name;
Expand All @@ -16,36 +22,4 @@ public class AgentCreateRequest {
private BigDecimal commissionPercent;

@NotNull private AgentType type;

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public BigDecimal getCommissionPercent() {
return commissionPercent;
}

public void setCommissionPercent(BigDecimal commissionPercent) {
this.commissionPercent = commissionPercent;
}

public AgentType getType() {
return type;
}

public void setType(AgentType type) {
this.type = type;
}
}
70 changes: 6 additions & 64 deletions src/main/java/com/shipping/freightops/dto/AgentResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
import com.shipping.freightops.enums.AgentType;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
public class AgentResponse {

private Long id;
Expand All @@ -14,68 +20,4 @@ public class AgentResponse {
private boolean active;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public BigDecimal getCommissionPercent() {
return commissionPercent;
}

public void setCommissionPercent(BigDecimal commissionPercent) {
this.commissionPercent = commissionPercent;
}

public AgentType getType() {
return type;
}

public void setType(AgentType type) {
this.type = type;
}

public boolean isActive() {
return active;
}

public void setActive(boolean active) {
this.active = active;
}

public LocalDateTime getCreatedAt() {
return createdAt;
}

public void setCreatedAt(LocalDateTime createdAt) {
this.createdAt = createdAt;
}

public LocalDateTime getUpdatedAt() {
return updatedAt;
}

public void setUpdatedAt(LocalDateTime updatedAt) {
this.updatedAt = updatedAt;
}
}
22 changes: 6 additions & 16 deletions src/main/java/com/shipping/freightops/dto/AgentUpdateRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,18 @@
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import java.math.BigDecimal;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
public class AgentUpdateRequest {

@DecimalMin("0.0")
@DecimalMax("100.0")
private BigDecimal commissionPercent;

private Boolean active;

public BigDecimal getCommissionPercent() {
return commissionPercent;
}

public void setCommissionPercent(BigDecimal commissionPercent) {
this.commissionPercent = commissionPercent;
}

public Boolean getActive() {
return active;
}

public void setActive(Boolean active) {
this.active = active;
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package com.shipping.freightops.dto;

import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
public class BookingStatusUpdateRequest {

@NotNull private boolean bookingOpen;

public boolean isBookingOpen() {
return bookingOpen;
}

public void setBookingOpen(boolean bookingOpen) {
this.bookingOpen = bookingOpen;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package com.shipping.freightops.dto;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class ContainerLabelResponse {
private final byte[] content;
private final String fileName;
Expand All @@ -8,12 +13,4 @@ public ContainerLabelResponse(byte[] content, String fileName) {
this.content = content;
this.fileName = fileName;
}

public byte[] getContent() {
return content;
}

public String getFileName() {
return fileName;
}
}
30 changes: 6 additions & 24 deletions src/main/java/com/shipping/freightops/dto/ContainerResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
import com.shipping.freightops.enums.ContainerSize;
import com.shipping.freightops.enums.ContainerType;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/** Read-only view of a container returned by the API. */
@Getter
@Setter
@NoArgsConstructor
public class ContainerResponse {

private Long id;
Expand All @@ -26,28 +32,4 @@ public static ContainerResponse fromEntity(Container container) {
dto.createdAt = container.getCreatedAt();
return dto;
}

public Long getId() {
return id;
}

public String getContainerCode() {
return containerCode;
}

public ContainerSize getSize() {
return size;
}

public ContainerType getType() {
return type;
}

public int getTeu() {
return teu;
}

public LocalDateTime getCreatedAt() {
return createdAt;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
public class ContainerTrackingResponse {
private String containerCode;
private ContainerSize containerSize;
Expand Down Expand Up @@ -42,20 +48,4 @@ public static ContainerTrackingResponse fromEntities(List<FreightOrder> orders)

return dto;
}

public String getContainerCode() {
return containerCode;
}

public ContainerSize getContainerSize() {
return containerSize;
}

public ContainerType getContainerType() {
return containerType;
}

public List<VoyageTrackingResponse> getVoyages() {
return voyages;
}
}
Loading
Loading