2026-10-07 18:22:30 +02:00
|
|
|
use crate::{Link, Track, Waypoints};
|
2026-09-18 09:03:51 +02:00
|
|
|
|
2026-10-08 19:04:46 +02:00
|
|
|
use super::common::uuid_id;
|
2026-10-02 18:06:45 +02:00
|
|
|
|
2026-10-08 19:04:46 +02:00
|
|
|
uuid_id!(FileId);
|
2026-10-02 18:06:45 +02:00
|
|
|
|
2026-10-08 18:34:19 +02:00
|
|
|
#[derive(Debug, Default, Clone)]
|
2026-10-02 18:06:45 +02:00
|
|
|
pub struct File {
|
|
|
|
|
pub id: FileId,
|
|
|
|
|
pub info: FileInfo,
|
2026-09-18 09:03:51 +02:00
|
|
|
pub trk: Vec<Track>,
|
2026-10-07 18:22:30 +02:00
|
|
|
pub wpt: Waypoints,
|
2026-09-18 09:03:51 +02:00
|
|
|
}
|
|
|
|
|
|
2026-10-08 18:34:19 +02:00
|
|
|
#[derive(Debug, Default, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
|
2026-10-02 18:06:45 +02:00
|
|
|
pub struct FileInfo {
|
2026-09-18 09:03:51 +02:00
|
|
|
pub name: String,
|
|
|
|
|
pub desc: Option<String>,
|
|
|
|
|
pub author: Option<Author>,
|
|
|
|
|
pub link: Option<Link>,
|
|
|
|
|
pub time: Option<i64>,
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-08 18:34:19 +02:00
|
|
|
#[derive(Debug, Default, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
|
2026-09-18 09:03:51 +02:00
|
|
|
pub struct Author {
|
|
|
|
|
pub name: Option<String>,
|
|
|
|
|
pub email: Option<String>,
|
|
|
|
|
pub link: Option<Link>,
|
|
|
|
|
}
|