Public Access
mirror of
https://github.com/xlorepdarkhelm/numinar-coding-project.git
synced 2026-09-11 18:37:36 -04:00
Working on getting the models set up.
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user