Add create document endpoint

This commit is contained in:
Andras Schmelczer 2024-12-08 17:17:02 +00:00
commit 1e1934b492
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -2,6 +2,8 @@ use chrono::{DateTime, Utc};
use schemars::JsonSchema;
use serde::Deserialize;
use crate::database::models::DocumentVersionId;
#[derive(Debug, Deserialize, JsonSchema)]
pub struct CreateDocumentVersion {
pub created_date: DateTime<Utc>,
@ -10,6 +12,15 @@ pub struct CreateDocumentVersion {
pub is_binary: bool,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct UpdateDocumentVersion {
pub parent_version_id: DocumentVersionId,
pub created_date: DateTime<Utc>,
pub relative_path: String,
pub content_base64: String,
pub is_binary: bool,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct DeleteDocumentVersion {
pub created_date: DateTime<Utc>,