Automated Action becbb01753 Implement small business inventory system with FastAPI and SQLite
- Set up project structure for FastAPI application
- Create database models for items, categories, suppliers, and transactions
- Set up Alembic for database migrations
- Implement API endpoints for all entities
- Add authentication with JWT tokens
- Add health check endpoint
- Create comprehensive README with documentation
2025-06-12 11:24:38 +00:00

36 lines
673 B
Python

from pydantic import BaseModel, EmailStr
from typing import Optional
class UserBase(BaseModel):
email: EmailStr
full_name: Optional[str] = None
is_active: Optional[bool] = True
is_superuser: bool = False
class UserCreate(UserBase):
password: str
class UserUpdate(BaseModel):
email: Optional[EmailStr] = None
full_name: Optional[str] = None
password: Optional[str] = None
is_active: Optional[bool] = None
is_superuser: Optional[bool] = None
class UserInDBBase(UserBase):
id: int
class Config:
from_attributes = True
class User(UserInDBBase):
pass
class UserInDB(UserInDBBase):
hashed_password: str