feat: add created_at timestamp field to Provider struct
- Add optional created_at field to track provider creation time - Serialize field as camelCase (createdAt) for JSON compatibility - Skip serialization when field is None to maintain backward compatibility
This commit is contained in:
@@ -16,6 +16,9 @@ pub struct Provider {
|
||||
pub website_url: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub category: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[serde(rename = "createdAt")]
|
||||
pub created_at: Option<i64>,
|
||||
}
|
||||
|
||||
impl Provider {
|
||||
@@ -32,6 +35,7 @@ impl Provider {
|
||||
settings_config,
|
||||
website_url,
|
||||
category: None,
|
||||
created_at: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user