media_tools/models/
profile_preferences.rs1use serde::{Deserialize, Serialize};
3
4use super::MediaProfileId;
5
6#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
8#[serde(default)]
9pub struct ProfilePreferences {
10 pub profile_id: MediaProfileId,
11 pub liked_genres: Vec<String>,
12 pub disliked_genres: Vec<String>,
13 pub preferred_languages: Vec<String>,
14 pub liked_themes: Vec<String>,
15 pub disliked_themes: Vec<String>,
16}
17
18impl ProfilePreferences {
19 pub fn new(profile_id: MediaProfileId) -> Self {
20 Self {
21 profile_id,
22 liked_genres: Vec::new(),
23 disliked_genres: Vec::new(),
24 preferred_languages: Vec::new(),
25 liked_themes: Vec::new(),
26 disliked_themes: Vec::new(),
27 }
28 }
29}
30
31impl Default for ProfilePreferences {
32 fn default() -> Self {
33 Self::new(MediaProfileId::new())
34 }
35}