refactor: restructure project into layered architecture
This commit is contained in:
21
backend/app/db/models.py
Normal file
21
backend/app/db/models.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from sqlalchemy import Column
|
||||
from sqlalchemy import Integer
|
||||
from sqlalchemy import String
|
||||
|
||||
from app.db.session import Base
|
||||
|
||||
|
||||
class Item(Base):
|
||||
|
||||
__tablename__ = "items"
|
||||
|
||||
id = Column(
|
||||
Integer,
|
||||
primary_key=True,
|
||||
index=True
|
||||
)
|
||||
|
||||
title = Column(
|
||||
String,
|
||||
nullable=False
|
||||
)
|
||||
Reference in New Issue
Block a user