12 lines
347 B
Python
12 lines
347 B
Python
from sqlalchemy import Column, Integer, String
|
|
from app.database.database import Base
|
|
|
|
|
|
class Category(Base):
|
|
__tablename__ = "category"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
name = Column(String, unique=True, index=True)
|
|
slug = Column(String, unique=True, index=True)
|
|
description = Column(String, nullable=True)
|