Skip to main content

max / goingson

814 B · 26 lines History Blame Raw
1 //! Weekly review domain types.
2
3 use chrono::{DateTime, Utc};
4 use serde::{Deserialize, Serialize};
5 use crate::id_types::{WeeklyReviewId, UserId};
6
7 // ============ Weekly Review ============
8
9 /// A weekly review record tracking completion status.
10 #[derive(Debug, Clone, Serialize, Deserialize)]
11 #[serde(rename_all = "camelCase")]
12 pub struct WeeklyReview {
13 /// Unique identifier.
14 pub id: WeeklyReviewId,
15 /// Owner user ID.
16 pub user_id: UserId,
17 /// The Monday of the week being reviewed (YYYY-MM-DD).
18 pub week_start_date: chrono::NaiveDate,
19 /// When the review was completed.
20 pub completed_at: DateTime<Utc>,
21 /// Optional notes from the review.
22 pub notes: String,
23 /// Days marked as vacation for the coming week (0=Mon, 1=Tue, ... 6=Sun).
24 pub vacation_days: Vec<u8>,
25 }
26