rs_plugin_common_interfaces/domain/
watched.rs1use serde::{Deserialize, Serialize};
2
3use crate::MediaType;
4
5#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)]
6#[serde(rename_all = "camelCase")]
7pub struct Watched {
8 #[serde(rename = "type")]
9 pub kind: MediaType,
10 pub id: String,
11 pub user_ref: Option<String>,
12 pub date: i64,
13 pub modified: u64,
14}
15
16#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)]
17#[serde(rename_all = "camelCase")]
18pub struct WatchedForAdd {
19 #[serde(rename = "type")]
20 pub kind: MediaType,
21 pub id: String,
22 pub date: i64,
23}
24
25#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)]
26#[serde(rename_all = "camelCase")]
27pub struct WatchedLight {
28 pub date: i64,
29}
30
31#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)]
32#[serde(rename_all = "camelCase")]
33pub struct WatchedForDelete {
34 #[serde(rename = "type")]
35 pub kind: MediaType,
36 pub ids: Vec<String>,
38}
39
40#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)]
41#[serde(rename_all = "camelCase")]
42pub struct Unwatched {
43 #[serde(rename = "type")]
44 pub kind: MediaType,
45 pub ids: Vec<String>,
47 pub user_ref: Option<String>,
48 pub modified: u64,
49}