package org.ros.chatto.dto;

import java.time.Instant;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import org.ros.chatto.model.MessageCipher;

import lombok.Data;

@Data
public class ReencryptionDTO {
	@NotBlank(message = "Username should not be blank")
	@Pattern(regexp = "^[A-Za-z0-9]+$", message = "Username must be alphanumeric")
	@Size(max = 15)
	private String toUser, fromUser;
	@NotBlank
	@Size(max = 600)
	private MessageCipher messageCipher;
	private Instant messageTime;
}
