mirror of
https://github.com/sortedcord/alemno-payments.git
synced 2026-07-22 04:02:49 +05:30
feat: Add API endpoint for managing categories
This commit is contained in:
@@ -2,5 +2,6 @@ from app.db.base import Base
|
||||
from app.db.models.job import Job
|
||||
from app.db.models.transaction import Transaction
|
||||
from app.db.models.job_summary import JobSummary
|
||||
from app.db.models.category import Category
|
||||
|
||||
__all__ = ["Base", "Job", "Transaction", "JobSummary"]
|
||||
__all__ = ["Base", "Job", "Transaction", "JobSummary", "Category"]
|
||||
|
||||
10
app/db/models/category.py
Normal file
10
app/db/models/category.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from sqlalchemy import Integer, String
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
from app.db.base import Base
|
||||
|
||||
|
||||
class Category(Base):
|
||||
__tablename__ = "categories"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
name: Mapped[str] = mapped_column(String(100), unique=True, nullable=False)
|
||||
Reference in New Issue
Block a user