Initial monorepo structure
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""Module model."""
|
||||
|
||||
from sqlalchemy import Column, String, Boolean, Text, Integer
|
||||
from sqlalchemy.orm import relationship
|
||||
from app.models.base import Base, TimestampMixin
|
||||
|
||||
|
||||
class Module(Base, TimestampMixin):
|
||||
__tablename__ = "modules"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
name = Column(String(100), nullable=False)
|
||||
slug = Column(String(50), unique=True, nullable=False)
|
||||
description = Column(Text)
|
||||
url = Column(String(500), nullable=False)
|
||||
icon = Column(String(50), default="Box")
|
||||
is_active = Column(Boolean, default=True)
|
||||
api_key = Column(String(64), unique=True)
|
||||
|
||||
module_roles = relationship("ModuleRole", back_populates="module", cascade="all, delete-orphan")
|
||||
Reference in New Issue
Block a user