CoolFace
Apppublic

sakthivikram/geo-location

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
CreateIssueRequest.java54 linesDownload Raw Back to dto
1package com.georeport.dto;2 3import com.georeport.entity.IssuePriority;4import jakarta.validation.constraints.*;5import lombok.*;6 7/**8 * DTO for creating a new issue.9 */10@Data11@NoArgsConstructor12@AllArgsConstructor13@Builder14public class CreateIssueRequest {15 16    @NotBlank(message = "Title is required")17    @Size(min = 5, max = 200, message = "Title must be between 5 and 200 characters")18    private String title;19 20    @NotBlank(message = "Description is required")21    @Size(min = 10, max = 2000, message = "Description must be between 10 and 2000 characters")22    private String description;23 24    @NotNull(message = "Latitude is required")25    @DecimalMin(value = "-90.0", message = "Latitude must be between -90 and 90")26    @DecimalMax(value = "90.0", message = "Latitude must be between -90 and 90")27    private Double latitude;28 29    @NotNull(message = "Longitude is required")30    @DecimalMin(value = "-180.0", message = "Longitude must be between -180 and 180")31    @DecimalMax(value = "180.0", message = "Longitude must be between -180 and 180")32    private Double longitude;33 34    private String address;35 36    @Size(max = 50, message = "Ward must not exceed 50 characters")37    private String ward;38 39    @Size(max = 200, message = "Landmark must not exceed 200 characters")40    private String landmark;41 42    @NotNull(message = "Category ID is required")43    private Long categoryId;44 45    private IssuePriority priority;46 47    @Email(message = "Contact email must be valid")48    @Size(max = 100, message = "Contact email must not exceed 100 characters")49    private String contactEmail;50 51    @Size(max = 20, message = "Contact phone must not exceed 20 characters")52    private String contactPhone;53}54