backend
This commit is contained in:
commit
d7666f7b2c
44 changed files with 2246 additions and 0 deletions
23
backend/schemas/document.py
Normal file
23
backend/schemas/document.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
from pydantic import BaseModel, Field
|
||||
from datetime import datetime
|
||||
|
||||
class DocumentBase(BaseModel):
|
||||
filename: str
|
||||
|
||||
class DocumentCreate(DocumentBase):
|
||||
# Pas besoin de filepath ici, il sera généré par le backend
|
||||
pass
|
||||
|
||||
class DocumentResponse(DocumentBase):
|
||||
id: int
|
||||
filepath: str
|
||||
owner_id: int
|
||||
uploaded_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
class DocumentDeleteResponse(BaseModel):
|
||||
detail: str
|
||||
filename: str
|
||||
id: int
|
Loading…
Add table
Add a link
Reference in a new issue