Initial commit: mail-server with WebFlux backend and Angular v22 Synthwave frontend
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.mailserver.dto;
|
||||
|
||||
public class AttachmentResponse {
|
||||
|
||||
private Long id;
|
||||
private String filename;
|
||||
private String contentType;
|
||||
private Long sizeBytes;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
|
||||
public String getFilename() { return filename; }
|
||||
public void setFilename(String filename) { this.filename = filename; }
|
||||
|
||||
public String getContentType() { return contentType; }
|
||||
public void setContentType(String contentType) { this.contentType = contentType; }
|
||||
|
||||
public Long getSizeBytes() { return sizeBytes; }
|
||||
public void setSizeBytes(Long sizeBytes) { this.sizeBytes = sizeBytes; }
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.mailserver.dto;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
public class FolderResponse {
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private Integer messageCount;
|
||||
private Integer unreadCount;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
|
||||
public String getName() { return name; }
|
||||
public void setName(String name) { this.name = name; }
|
||||
|
||||
public Integer getMessageCount() { return messageCount; }
|
||||
public void setMessageCount(Integer messageCount) { this.messageCount = messageCount; }
|
||||
|
||||
public Integer getUnreadCount() { return unreadCount; }
|
||||
public void setUnreadCount(Integer unreadCount) { this.unreadCount = unreadCount; }
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.mailserver.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
public class LoginRequest {
|
||||
|
||||
@NotBlank
|
||||
private String email;
|
||||
|
||||
@NotBlank
|
||||
private String password;
|
||||
|
||||
public String getEmail() { return email; }
|
||||
public void setEmail(String email) { this.email = email; }
|
||||
|
||||
public String getPassword() { return password; }
|
||||
public void setPassword(String password) { this.password = password; }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.mailserver.dto;
|
||||
|
||||
public class LoginResponse {
|
||||
|
||||
private String token;
|
||||
private String email;
|
||||
|
||||
public String getToken() { return token; }
|
||||
public void setToken(String token) { this.token = token; }
|
||||
|
||||
public String getEmail() { return email; }
|
||||
public void setEmail(String email) { this.email = email; }
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.mailserver.dto;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
public class MessageResponse {
|
||||
|
||||
private Long id;
|
||||
private String senderEmail;
|
||||
private String senderName;
|
||||
private String recipientEmail;
|
||||
private String subject;
|
||||
private String body;
|
||||
private boolean html;
|
||||
private boolean read;
|
||||
private boolean flagged;
|
||||
private boolean spam;
|
||||
private Long messageSize;
|
||||
private Instant receivedAt;
|
||||
private Long folderId;
|
||||
private boolean hasAttachments;
|
||||
private int attachmentCount;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
|
||||
public String getSenderEmail() { return senderEmail; }
|
||||
public void setSenderEmail(String senderEmail) { this.senderEmail = senderEmail; }
|
||||
|
||||
public String getSenderName() { return senderName; }
|
||||
public void setSenderName(String senderName) { this.senderName = senderName; }
|
||||
|
||||
public String getRecipientEmail() { return recipientEmail; }
|
||||
public void setRecipientEmail(String recipientEmail) { this.recipientEmail = recipientEmail; }
|
||||
|
||||
public String getSubject() { return subject; }
|
||||
public void setSubject(String subject) { this.subject = subject; }
|
||||
|
||||
public String getBody() { return body; }
|
||||
public void setBody(String body) { this.body = body; }
|
||||
|
||||
public boolean isHtml() { return html; }
|
||||
public void setHtml(boolean html) { this.html = html; }
|
||||
|
||||
public boolean isRead() { return read; }
|
||||
public void setRead(boolean read) { this.read = read; }
|
||||
|
||||
public boolean isFlagged() { return flagged; }
|
||||
public void setFlagged(boolean flagged) { this.flagged = flagged; }
|
||||
|
||||
public boolean isSpam() { return spam; }
|
||||
public void setSpam(boolean spam) { this.spam = spam; }
|
||||
|
||||
public Long getMessageSize() { return messageSize; }
|
||||
public void setMessageSize(Long messageSize) { this.messageSize = messageSize; }
|
||||
|
||||
public Instant getReceivedAt() { return receivedAt; }
|
||||
public void setReceivedAt(Instant receivedAt) { this.receivedAt = receivedAt; }
|
||||
|
||||
public Long getFolderId() { return folderId; }
|
||||
public void setFolderId(Long folderId) { this.folderId = folderId; }
|
||||
|
||||
public boolean isHasAttachments() { return hasAttachments; }
|
||||
public void setHasAttachments(boolean hasAttachments) { this.hasAttachments = hasAttachments; }
|
||||
|
||||
public int getAttachmentCount() { return attachmentCount; }
|
||||
public void setAttachmentCount(int attachmentCount) { this.attachmentCount = attachmentCount; }
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mailserver.dto;
|
||||
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
public class RegisterRequest {
|
||||
|
||||
@NotBlank
|
||||
@Email
|
||||
@Size(max = 200)
|
||||
private String email;
|
||||
|
||||
@NotBlank
|
||||
@Size(min = 6, max = 100)
|
||||
private String password;
|
||||
|
||||
@Size(max = 100)
|
||||
private String displayName;
|
||||
|
||||
public String getEmail() { return email; }
|
||||
public void setEmail(String email) { this.email = email; }
|
||||
|
||||
public String getPassword() { return password; }
|
||||
public void setPassword(String password) { this.password = password; }
|
||||
|
||||
public String getDisplayName() { return displayName; }
|
||||
public void setDisplayName(String displayName) { this.displayName = displayName; }
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.mailserver.dto;
|
||||
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
public class SendRequest {
|
||||
|
||||
@NotBlank
|
||||
@Email
|
||||
private String to;
|
||||
|
||||
@NotBlank
|
||||
private String subject;
|
||||
|
||||
@NotBlank
|
||||
private String body;
|
||||
|
||||
private boolean html = false;
|
||||
|
||||
public String getTo() { return to; }
|
||||
public void setTo(String to) { this.to = to; }
|
||||
|
||||
public String getSubject() { return subject; }
|
||||
public void setSubject(String subject) { this.subject = subject; }
|
||||
|
||||
public String getBody() { return body; }
|
||||
public void setBody(String body) { this.body = body; }
|
||||
|
||||
public boolean isHtml() { return html; }
|
||||
public void setHtml(boolean html) { this.html = html; }
|
||||
}
|
||||
Reference in New Issue
Block a user