23 lines
613 B
Java
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;
|
|
}
|