Skip to main content

media_tools/models/
family_media_preferences.rs

1//! Explicit preferences shared by a family, independent of individual profiles.
2use agent_storage::FamilyId;
3use serde::{Deserialize, Serialize};
4
5/// Shared household taste that contributes to every family recommendation.
6#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
7#[serde(default)]
8pub struct FamilyMediaPreferences {
9    pub family_id: FamilyId,
10    pub liked_genres: Vec<String>,
11    pub disliked_genres: Vec<String>,
12    pub preferred_languages: Vec<String>,
13    pub liked_themes: Vec<String>,
14    pub disliked_themes: Vec<String>,
15}
16
17impl FamilyMediaPreferences {
18    pub fn new(family_id: FamilyId) -> Self {
19        Self {
20            family_id,
21            liked_genres: Vec::new(),
22            disliked_genres: Vec::new(),
23            preferred_languages: Vec::new(),
24            liked_themes: Vec::new(),
25            disliked_themes: Vec::new(),
26        }
27    }
28}
29
30impl Default for FamilyMediaPreferences {
31    fn default() -> Self {
32        Self::new(FamilyId::new())
33    }
34}