application layer

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-04 01:19:59 +02:00
parent 810bad1126
commit 65bab7fd44
16 changed files with 392 additions and 31 deletions

View File

@@ -206,3 +206,23 @@ impl PasswordHash {
&self.0
}
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct PosterUrl(String);
impl PosterUrl {
pub fn new(url: String) -> Result<Self, DomainError> {
let trimmed = url.trim();
if trimmed.is_empty() {
Err(DomainError::ValidationError(
"Poster URL cannot be empty".into(),
))
} else {
Ok(Self(trimmed.to_string()))
}
}
pub fn value(&self) -> &str {
&self.0
}
}