Skip to content
15 changes: 15 additions & 0 deletions src/main/java/org/example/alfs/dto/comment/CommentCreateDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.example.alfs.dto.comment;

import jakarta.validation.constraints.NotBlank;
import lombok.Data;

/*
* DTO used to create a comment on a ticket.
* Can be used by reporter, investigator and admin.
*/
@Data
public class CommentCreateDTO {

@NotBlank
private String message;
}
25 changes: 25 additions & 0 deletions src/main/java/org/example/alfs/dto/comment/CommentViewDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package org.example.alfs.dto.comment;

import lombok.Data;

import java.time.LocalDateTime;

/*
* DTO returned when retrieving comments for a ticket.
*
* Contains comment message, creation timestamp and information
* about who created the comment. The author can be either an
* anonymous reporter or a logged-in user such as an investigator
* or admin.
*
* Used when displaying ticket conversation history.
*/
@Data
public class CommentViewDTO {

private Long id;
private String message;
private String author;
private String role;
private LocalDateTime createdAt;
}
14 changes: 14 additions & 0 deletions src/main/java/org/example/alfs/dto/ticket/TicketAssignDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.example.alfs.dto.ticket;

import jakarta.validation.constraints.NotNull;
import lombok.Data;

/*
Admin assigns ticket to investigator
*/
@Data
public class TicketAssignDTO {

@NotNull
private Long investigatorId;
}
23 changes: 23 additions & 0 deletions src/main/java/org/example/alfs/dto/ticket/TicketCreateDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package org.example.alfs.dto.ticket;

import jakarta.validation.constraints.NotBlank;
import lombok.Data;

/*
* Reporter creates ticket
* The reporter provides the initial information describing the incident.
*
* The reporter cannot modify the ticket after creation. Any additional
* information must be provided through comments.
*/

@Data
public class TicketCreateDTO {


@NotBlank
private String title;

@NotBlank
private String description;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.example.alfs.dto.ticket;

import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.example.alfs.enums.TicketStatus;

/*
*Investigator changes tickets status
*The status represents the lifecycle of the ticket
* (e.g. OPEN, IN_PROGRESS, RESOLVED, CLOSED).
*/
@Data
public class TicketStatusUpdateDTO {

@NotNull
private TicketStatus status;


}
26 changes: 26 additions & 0 deletions src/main/java/org/example/alfs/dto/ticket/TicketViewDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.example.alfs.dto.ticket;

import lombok.Data;
import org.example.alfs.enums.TicketStatus;

import java.time.LocalDateTime;

/*
* DTO returned when retrieving ticket information.
*
* Contains the main ticket data such as title, description, status,
* creation timestamp and assigned handler.
*
* Used by admin and investigators when viewing tickets.
*/
@Data
public class TicketViewDTO {

private Long id;
private String title;
private String description;
private TicketStatus status;
private LocalDateTime createdAt;

private Long assignedInvestigatorId;
}
Loading