Files
no-copy/src/main/java/ru/soune/nocopy/dto/complaint/LawCaseResponse.java
T
vladp 29ed74745f
Test Workflow / test (push) Successful in 4s
dev add violation link
2026-04-07 15:35:32 +07:00

47 lines
1.4 KiB
Java

package ru.soune.nocopy.dto.complaint;
import lombok.Builder;
import lombok.Data;
import ru.soune.nocopy.entity.complaint.LawCase;
import ru.soune.nocopy.entity.complaint.LawCasePriority;
import ru.soune.nocopy.entity.complaint.LawCaseType;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
@Data
@Builder
public class LawCaseResponse {
private Long id;
private String name;
private String description;
private BigDecimal amount;
private LawCasePriority priority;
private LawCaseType type;
private String lawyer;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
private int pageNumber;
private int pageSize;
private long totalElements;
private int totalPages;
private long violationId;
private List<LawCaseResponse> content;
public static LawCaseResponse fromEntity(LawCase lawCase) {
return LawCaseResponse.builder()
.id(lawCase.getId())
.name(lawCase.getName())
.description(lawCase.getDescription())
.amount(lawCase.getAmount())
.priority(lawCase.getPriority())
.type(lawCase.getType())
.lawyer(lawCase.getLawyer())
.createdAt(lawCase.getCreatedAt())
.updatedAt(lawCase.getUpdatedAt())
.violationId(lawCase.getViolationId())
.build();
}
}