feat: add FastAPI backend with PostgreSQL and start script fixes
- Add server/ directory with FastAPI backend - Fix server/start.sh to properly handle venv on Windows/Git Bash - Add alembic migrations and pyproject.toml - Add server tests Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
24
server/src/app/schemas/employee.py
Normal file
24
server/src/app/schemas/employee.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, EmailStr
|
||||
|
||||
|
||||
class EmployeeCreate(BaseModel):
|
||||
employee_no: str
|
||||
name: str
|
||||
department: str
|
||||
email: EmailStr
|
||||
|
||||
|
||||
class EmployeeRead(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
id: str
|
||||
employee_no: str
|
||||
name: str
|
||||
department: str
|
||||
email: EmailStr
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
Reference in New Issue
Block a user