Phase 2.2: MongoDB connection and models

This commit is contained in:
goose 2026-02-14 15:37:02 -03:00
parent 1cf927f527
commit 154c3d1152
13 changed files with 544 additions and 5 deletions

View file

@ -0,0 +1,31 @@
use serde::{Deserialize, Serialize};
use mongodb::bson::{oid::ObjectId, DateTime};
use super::health_data::EncryptedField;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Appointment {
#[serde(rename = "_id", skip_serializing_if = "Option::is_none")]
pub id: Option<ObjectId>,
#[serde(rename = "appointmentId")]
pub appointment_id: String,
#[serde(rename = "userId")]
pub user_id: String,
#[serde(rename = "profileId")]
pub profile_id: String,
#[serde(rename = "appointmentData")]
pub appointment_data: EncryptedField,
#[serde(rename = "reminders")]
pub reminders: Vec<AppointmentReminder>,
#[serde(rename = "createdAt")]
pub created_at: DateTime,
#[serde(rename = "updatedAt")]
pub updated_at: DateTime,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AppointmentReminder {
#[serde(rename = "reminderId")]
pub reminder_id: String,
#[serde(rename = "scheduledTime")]
pub scheduled_time: String,
}