- Add #![allow(dead_code)] to modules with future features - Fix trailing whitespace in main.rs - Remove unused imports (Claims, ObjectId, Deserialize, Serialize) - Fix unnecessary map_err in health_stats.rs - Add allow attributes for experimental and redundant code - Fix redundant pattern matching in health.rs
35 lines
1 KiB
Rust
35 lines
1 KiB
Rust
#![allow(dead_code)]
|
|
#![allow(clippy::useless_conversion)]
|
|
#![allow(unused_imports)]
|
|
use mongodb::bson::{oid::ObjectId, DateTime};
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct HealthData {
|
|
#[serde(rename = "_id", skip_serializing_if = "Option::is_none")]
|
|
pub id: Option<ObjectId>,
|
|
#[serde(rename = "healthDataId")]
|
|
pub health_data_id: String,
|
|
#[serde(rename = "userId")]
|
|
pub user_id: String,
|
|
#[serde(rename = "profileId")]
|
|
pub profile_id: String,
|
|
#[serde(rename = "familyId")]
|
|
pub family_id: Option<String>,
|
|
#[serde(rename = "healthData")]
|
|
pub health_data: Vec<EncryptedField>,
|
|
#[serde(rename = "createdAt")]
|
|
pub created_at: DateTime,
|
|
#[serde(rename = "updatedAt")]
|
|
pub updated_at: DateTime,
|
|
#[serde(rename = "dataSource")]
|
|
pub data_source: String,
|
|
}
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct EncryptedField {
|
|
pub encrypted: bool,
|
|
pub data: String,
|
|
pub iv: String,
|
|
pub auth_tag: String,
|
|
}
|