use bytes::Bytes;
use chrono::{DateTime, Utc};
use serde::Deserialize;
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct FileInfo {
#[serde(rename = "type")]
pub file_type: Option<String>,
pub content_type: Option<String>,
pub name: Option<String>,
pub created_date: Option<DateTime<Utc>>,
pub modified_date: Option<DateTime<Utc>>,
pub owner: Option<String>,
pub notes: Option<String>,
pub file_href: Option<String>,
}
#[derive(Debug, Clone)]
pub struct FileResponse {
pub content_type: Option<String>,
pub file_name: Option<String>,
pub data: Bytes,
}
#[derive(Debug, Clone)]
pub struct SaveFileRequest {
pub record_id: i32,
pub field_id: i32,
pub notes: Option<String>,
pub modified_date: Option<DateTime<Utc>>,
pub file_name: String,
pub file_data: Vec<u8>,
pub content_type: String,
}
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CreatedWithIdResponse {
pub id: i32,
}