feat: add database connection with modified endpoints

This commit is contained in:
2025-07-22 17:05:21 +00:00
parent 4452381601
commit e82bb94d7f
10 changed files with 111 additions and 17 deletions

9
dependencies/models.py vendored Normal file
View File

@@ -0,0 +1,9 @@
from sqlalchemy import Column, Integer, String
from dependencies.database import Base
class UrlMapping(Base):
__tablename__ = "url_mapping"
id = Column(Integer, primary_key=True, index=True)
url = Column(String, nullable=False)
shortcode = Column(String, index=True, unique=True, nullable=False)