feat(db): all domain models, initial Alembic migration (32 tables), seed script (8 districts, 89 regions, roles)

This commit is contained in:
apuc committed 2026-09-26 19:46:44 +03:00
1 parent 71460ab56a
commit 4a610ba94a
19 files changed
+1290 -2

No files matched your search

+96
View File
@@ -0,0 +1,96 @@
"""Перечисления предметной области."""
from enum import StrEnum
class MessengerType(StrEnum):
TELEGRAM = "telegram"
MAX = "max"
class UserStatus(StrEnum):
ACTIVE = "active"
BLOCKED = "blocked"
PENDING = "pending"
class RoleCode(StrEnum):
ADMIN = "admin"
COORDINATOR = "coordinator"
REGION_HEAD = "region_head"
MEMBER = "member"
DEPUTY = "deputy"
class LoginTokenStatus(StrEnum):
ACTIVE = "active"
USED = "used"
EXPIRED = "expired"
REVOKED = "revoked"
class SnapshotKind(StrEnum):
POINT0 = "point0"
CURRENT = "current"
HISTORY = "history"
class MemberType(StrEnum):
MEMBER = "member"
RESIDENT = "resident"
class TaskStatus(StrEnum):
NEW = "new"
IN_PROGRESS = "in_progress"
REVIEW = "review"
DONE = "done"
class TaskPriority(StrEnum):
LOW = "low"
MEDIUM = "medium"
HIGH = "high"
class RequestType(StrEnum):
JOIN = "join"
ACCESS = "access"
EVENT = "event"
SUPPORT = "support"
class RequestStatus(StrEnum):
NEW = "new"
IN_PROGRESS = "in_progress"
CLOSED = "closed"
class BroadcastType(StrEnum):
INFO = "info"
EDUCATION = "education"
RATING = "rating"
class BroadcastStatus(StrEnum):
DRAFT = "draft"
SCHEDULED = "scheduled"
SENDING = "sending"
SENT = "sent"
FAILED = "failed"
class RecipientStatus(StrEnum):
PENDING = "pending"
SENT = "sent"
FAILED = "failed"
class ActorType(StrEnum):
USER = "user"
ASSISTANT = "assistant"
SYSTEM = "system"
class LinkType(StrEnum):
COMMUNITY = "community"
CHAT = "chat"