Added the Services layer to the code to do the database operation

This commit is contained in:
Gustavo Henrique Santos Souza de Miranda
2025-06-05 13:28:16 -03:00
parent 0a9c2952ec
commit 8ad57b548f
7 changed files with 129 additions and 0 deletions
+6
View File
@@ -1,3 +1,5 @@
from typing import Any
from sqlalchemy import Column, String, Integer
from ..database import Base
@@ -6,3 +8,7 @@ class TravelDiary(Base):
__tablename__ = "TravelDiary"
id = Column(Integer, primary_key=True)
name = Column(String)
def __init__(self, name: str, **kw: Any):
super().__init__(**kw)
self.name = name