feat: Introduce domain value objects for email, password, note title, and tags, integrating them across API, domain, and infrastructure for enhanced type safety and validation.

This commit is contained in:
2025-12-31 01:25:20 +01:00
parent 146d775f02
commit 93170d17dc
14 changed files with 881 additions and 211 deletions

View File

@@ -68,7 +68,7 @@ impl From<Tag> for TagResponse {
fn from(tag: Tag) -> Self {
Self {
id: tag.id,
name: tag.name,
name: tag.name.into_inner(), // Convert TagName to String
}
}
}
@@ -91,7 +91,7 @@ impl From<Note> for NoteResponse {
fn from(note: Note) -> Self {
Self {
id: note.id,
title: note.title,
title: note.title_str().to_string(), // Convert Option<NoteTitle> to String
content: note.content,
color: note.color,
is_pinned: note.is_pinned,
@@ -160,7 +160,7 @@ impl From<notes_domain::NoteVersion> for NoteVersionResponse {
Self {
id: version.id,
note_id: version.note_id,
title: version.title,
title: version.title.unwrap_or_default(), // Convert Option<String> to String
content: version.content,
created_at: version.created_at,
}