Skip to main content

boat_lib/models/
activity.rs

1use std::collections::HashSet;
2
3use crate::models::log::Log;
4
5#[derive(Debug, Clone)]
6pub struct Activity {
7    pub id: i64,
8    pub name: String,
9    pub description: Option<String>,
10    pub tags: HashSet<String>,
11    pub logs: Vec<Log>,
12}
13
14#[derive(Debug)]
15pub struct NewActivity {
16    pub name: String,
17    pub description: Option<String>,
18    pub tags: Vec<String>,
19}
20
21// Helper struct for base activity data
22#[derive(Debug)]
23pub struct ActivityBase {
24    pub id: i64,
25    pub name: String,
26    pub description: Option<String>,
27}