feat: Tái cấu trúc bot sang kiến trúc cog, thêm hỗ trợ đa máy chủ, giới thiệu tính năng đăng ký bóng đá, giao diện web và quản lý cấu hình.

This commit is contained in:
2026-01-16 17:26:42 +07:00
parent 8c38357c28
commit b24365927a
39 changed files with 3864 additions and 997 deletions
+19
View File
@@ -0,0 +1,19 @@
from sqlalchemy import Column, String, BigInteger, Boolean, ForeignKey, PrimaryKeyConstraint
from infra.db.base import Base, TimestampMixin
class FeatureToggle(Base, TimestampMixin):
__tablename__ = "feature_toggles"
guild_id = Column(BigInteger, ForeignKey("guilds.id"), nullable=False)
feature_name = Column(String(50), nullable=False)
is_enabled = Column(Boolean, default=False)
__table_args__ = (
PrimaryKeyConstraint('guild_id', 'feature_name'),
)
def __str__(self):
return f"Guild: {self.guild_id}, Feature: {self.feature_name}, Enabled: {self.is_enabled}"
def __repr__(self):
return self.__str__()