mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 23:22:57 +01:00
31 lines
522 B
Python
31 lines
522 B
Python
from pydantic import BaseModel
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
|
|
class DocumentsBase(BaseModel):
|
|
filename: str
|
|
|
|
|
|
class DocumentCreate(DocumentsBase):
|
|
uploaded_by: int
|
|
department_id: int
|
|
|
|
|
|
class DocumentUpdate(DocumentsBase):
|
|
pass
|
|
|
|
class DocumentList(DocumentsBase):
|
|
id: int
|
|
uploaded_by: int
|
|
uploaded_at: datetime
|
|
|
|
|
|
class Document(DocumentsBase):
|
|
id: int
|
|
uploaded_by: str
|
|
uploaded_at: datetime
|
|
department: str
|
|
|
|
class Config:
|
|
orm_mode = True
|