feat: add new encoder and restructure project

This commit is contained in:
2025-07-22 21:55:45 +00:00
parent 83d828c935
commit ee67589393
20 changed files with 143 additions and 75 deletions

1
app/models/__init__.py Normal file
View File

@@ -0,0 +1 @@
from .url import Url

9
app/models/url.py Normal file
View File

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