You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
966 B
Rust
40 lines
966 B
Rust
use crate::types::identifier::FileIdentifier;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
pub struct TagResponse {
|
|
pub id: i64,
|
|
pub namespace: Option<String>,
|
|
pub name: String,
|
|
pub implied_by: Option<i64>,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
pub struct NamespaceResponse {
|
|
pub id: i64,
|
|
pub name: String,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
pub struct ChangeFileTagsRequest {
|
|
pub file_id: FileIdentifier,
|
|
pub removed_tags: Vec<i64>,
|
|
pub added_tags: Vec<i64>,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
pub struct AddTagImplicationsRequest {
|
|
pub implications: Vec<TagImplication>,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
pub struct TagImplication {
|
|
pub tag_id: i64,
|
|
pub implied_tag_id: i64,
|
|
}
|
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
|
pub struct DeleteTagImplicationsRequest {
|
|
pub implications: Vec<TagImplication>,
|
|
}
|