CLIO v1.0 — Scanner Inteligente com IA (MVP)
This commit is contained in:
0
backend/app/schemas/__init__.py
Normal file
0
backend/app/schemas/__init__.py
Normal file
21
backend/app/schemas/auth.py
Normal file
21
backend/app/schemas/auth.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
|
||||
class RegisterRequest(BaseModel):
|
||||
email: str
|
||||
password: str
|
||||
name: Optional[str] = None
|
||||
|
||||
class LoginRequest(BaseModel):
|
||||
email: str
|
||||
password: str
|
||||
|
||||
class UserResponse(BaseModel):
|
||||
id: int
|
||||
email: str
|
||||
name: Optional[str]
|
||||
plan: str
|
||||
|
||||
class TokenResponse(BaseModel):
|
||||
access_token: str
|
||||
user: UserResponse
|
||||
22
backend/app/schemas/document.py
Normal file
22
backend/app/schemas/document.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional, List, Any
|
||||
from datetime import datetime
|
||||
|
||||
class ScanRequest(BaseModel):
|
||||
image: str # base64
|
||||
|
||||
class DocumentResponse(BaseModel):
|
||||
id: int
|
||||
title: Optional[str]
|
||||
category: Optional[str]
|
||||
extracted_text: Optional[str]
|
||||
summary: Optional[str]
|
||||
extracted_data: Optional[Any]
|
||||
risk_alerts: Optional[Any]
|
||||
tags: Optional[Any]
|
||||
file_size: Optional[int]
|
||||
created_at: datetime
|
||||
|
||||
class DocumentListResponse(BaseModel):
|
||||
documents: List[DocumentResponse]
|
||||
total: int
|
||||
Reference in New Issue
Block a user