Working on getting the models set up.

Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
2025-08-20 21:50:30 -04:00
parent f1498452fb
commit e15b62fae3
2 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ There is an alternative compose file specifically designed for running this proj
docker compose -f compose.dev.yml up
```
This compose file extends the standard compose file, adding in the necessary pieces to make the application usable in a local dev environment. In this configuration, the frontend is accessable from port 3000 like normal, the backend is accessable from port 8000, and postgres DB from 5432.
This compose file extends the standard compose file, adding in the necessary pieces to make the application usable in a local dev environment. In this configuration, the frontend is accessable from port 3000 like normal, the backend is accessable from port 8000, and postgres DB from 5432. The way this is set up, that command can easily be run in a separate terminal window during development for rapid testing of the piece(s) being worked on.
### Diagrams
+19
View File
@@ -0,0 +1,19 @@
"""Database models for the Numinar coding project backend."""
from sqlmodel import SQLModel, Field
class User(SQLModel, table=True):
"""User model for the application."""
id: int = Field(default=None, primary_key=True)
email: str = Field(index=True, unique=True)
name: str = Field(default=None)
class Room(SQLModel, table=True):
"""Room model for the application."""
id: int = Field(default=None, primary_key=True)
name: str = Field(index=True, unique=True)
location: str = Field(default=None)
equipment: str = Field(default=None)
capacity: int = Field(default=1)