Add create document endpoint
This commit is contained in:
parent
af7f6dd8f3
commit
1e1934b492
1 changed files with 71 additions and 17 deletions
|
|
@ -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>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue