Chatto/src/main/java/org/ros/chatto/dto/ChatMessageDTO.java
Rohan Sircar 6378f4b225 Switched from Date to Instant
Was causing issues with json parsing in desktop client
2020-06-16 19:12:25 +05:30

23 lines
613 B
Java

package org.ros.chatto.dto;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.time.Instant;
import lombok.Data;
@Data
public class ChatMessageDTO {
@NotBlank(message = "Username should not be blank")
@Pattern(regexp = "^[A-Za-z0-9]+$", message = "Username must be alphanumeric")
@Size(max=15)
private String toUser;
@Pattern(regexp = "^[A-Za-z0-9]+$", message = "Username must be alphanumeric")
@Size(max=15)
private String fromUser;
private MessageCipherDTO messageCipher;
private Instant messageTime;
}