nibi/app/
tag.rs

1use serde::{Deserialize, Serialize};
2use std::collections::BTreeMap;
3
4#[derive(Debug, Deserialize, Serialize)]
5pub struct Tag {
6	pub id: usize,
7	pub name: String,
8	pub path_name: String,
9	pub description: String,
10	#[serde(skip_serializing_if = "Option::is_none")]
11	pub ex: Option<BTreeMap<String, String>>,
12}
13
14impl Tag {
15	pub fn new(id: usize, path_name: String, name: String, description: String) -> Self {
16		Self {
17			id,
18			path_name,
19			name,
20			description,
21			ex: None,
22		}
23	}
24}