todo: exporter

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-09 14:30:11 +02:00
parent b0ce316c30
commit 0a18992a73
6 changed files with 96 additions and 16 deletions

View File

@@ -6,7 +6,7 @@ use crate::{
events::DomainEvent,
models::{
DiaryEntry, DiaryFilter, FeedEntry, Movie, Review, ReviewHistory, User, UserStats,
UserTrends, UserSummary,
UserSummary, UserTrends,
collections::{PageParams, Paginated},
},
value_objects::{
@@ -57,7 +57,10 @@ pub trait MovieRepository: Send + Sync {
pub enum MetadataSearchCriteria {
ImdbId(ExternalMetadataId),
Title { title: MovieTitle, year: Option<ReleaseYear> },
Title {
title: MovieTitle,
year: Option<ReleaseYear>,
},
}
#[async_trait]
@@ -119,3 +122,8 @@ pub trait PasswordHasher: Send + Sync {
async fn verify(&self, plain_password: &str, hash: &PasswordHash) -> Result<bool, DomainError>;
}
#[async_trait]
pub trait DiaryExporter: Send + Sync {
async fn serialize_reviews(&self, reviews: &[Review]) -> Result<Vec<u8>, DomainError>;
}