refactor (v2): better arch
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
33
crates/application/src/notes/queries.rs
Normal file
33
crates/application/src/notes/queries.rs
Normal file
@@ -0,0 +1,33 @@
|
||||
use uuid::Uuid;
|
||||
|
||||
use domain::note::entity::NoteFilter;
|
||||
|
||||
/// Query to list a user's notes.
|
||||
/// Provide either `filter.tag_id` (already resolved) **or** `tag_name`
|
||||
/// (the use case will resolve it). `tag_name` takes precedence.
|
||||
pub struct ListNotesQuery {
|
||||
pub user_id: Uuid,
|
||||
pub filter: NoteFilter,
|
||||
/// If set, resolves the tag by name before applying the filter.
|
||||
pub tag_name: Option<String>,
|
||||
}
|
||||
|
||||
pub struct GetNoteQuery {
|
||||
pub note_id: Uuid,
|
||||
pub user_id: Uuid,
|
||||
}
|
||||
|
||||
pub struct SearchNotesQuery {
|
||||
pub user_id: Uuid,
|
||||
pub query: String,
|
||||
}
|
||||
|
||||
pub struct GetVersionsQuery {
|
||||
pub note_id: Uuid,
|
||||
pub user_id: Uuid,
|
||||
}
|
||||
|
||||
pub struct GetRelatedQuery {
|
||||
pub note_id: Uuid,
|
||||
pub user_id: Uuid,
|
||||
}
|
||||
Reference in New Issue
Block a user