Initial commit: ROA2WEB - FastAPI + Vue.js + Telegram Bot
Modern ERP Reports Application with microservices architecture Tech Stack: - Backend: FastAPI + python-oracledb (Oracle DB integration) - Frontend: Vue.js 3 + PrimeVue + Vite - Telegram Bot: python-telegram-bot + SQLite - Infrastructure: Shared database pool, JWT authentication, SSH tunnel Features: - FastAPI backend with async Oracle connection pool - Vue.js 3 responsive frontend with PrimeVue components - Telegram bot alternative interface - Microservices architecture with shared components - Complete deployment support (Linux Docker + Windows IIS) - Comprehensive testing (Playwright E2E + pytest) Repository Structure: - reports-app/ - Main application (backend, frontend, telegram-bot) - shared/ - Shared components (database pool, auth, utils) - deployment/ - Deployment scripts (Linux & Windows) - docs/ - Project documentation - security/ - Security scanning and git hooks
This commit is contained in:
30
shared/database/models.py
Normal file
30
shared/database/models.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""
|
||||
Modele comune pentru toate aplicațiile ROA2WEB
|
||||
"""
|
||||
from pydantic import BaseModel, Field
|
||||
from typing import List, Optional, Dict
|
||||
from datetime import datetime
|
||||
|
||||
class Company(BaseModel):
|
||||
"""Model pentru firma/schema Oracle"""
|
||||
code: str = Field(description="Codul firmei (schema Oracle)")
|
||||
name: str = Field(description="Numele firmei")
|
||||
fiscal_code: Optional[str] = Field(description="Codul fiscal")
|
||||
is_active: bool = Field(default=True, description="Firma activă")
|
||||
|
||||
class User(BaseModel):
|
||||
"""Model pentru utilizator"""
|
||||
username: str = Field(description="Numele utilizatorului")
|
||||
email: Optional[str] = Field(description="Email utilizator")
|
||||
companies: List[str] = Field(description="Lista codurilor firmelor la care are acces")
|
||||
is_active: bool = Field(default=True, description="Utilizator activ")
|
||||
last_login: Optional[datetime] = Field(description="Ultima autentificare")
|
||||
|
||||
class DatabaseConfig(BaseModel):
|
||||
"""Configurare conexiune bază de date"""
|
||||
user: str
|
||||
password: str
|
||||
dsn: str
|
||||
min_connections: int = 2
|
||||
max_connections: int = 10
|
||||
increment: int = 1
|
||||
Reference in New Issue
Block a user