reminders.models module

class reminders.models.ReminderPriority(value)[מקור]

Bases: Enum

LOW = 'low'
MEDIUM = 'medium'
HIGH = 'high'
URGENT = 'urgent'
class reminders.models.ReminderStatus(value)[מקור]

Bases: Enum

PENDING = 'pending'
COMPLETED = 'completed'
CANCELLED = 'cancelled'
SNOOZED = 'snoozed'
FAILED = 'failed'
class reminders.models.ReminderType(value)[מקור]

Bases: Enum

BUG_FIX = 'bug_fix'
FEATURE = 'feature'
REFACTOR = 'refactor'
REVIEW = 'review'
LEARNING = 'learning'
GENERAL = 'general'
class reminders.models.RecurrenceType(value)[מקור]

Bases: Enum

NONE = 'none'
DAILY = 'daily'
WEEKLY = 'weekly'
MONTHLY = 'monthly'
CUSTOM = 'custom'
class reminders.models.ReminderConfig(max_reminders_per_user=50, max_title_length=200, max_description_length=1000, min_reminder_interval_minutes=5, max_future_days=365, default_snooze_minutes=60, max_retries=3, retry_delay_seconds=60)[מקור]

Bases: object

פרמטרים:
  • max_reminders_per_user (int)

  • max_title_length (int)

  • max_description_length (int)

  • min_reminder_interval_minutes (int)

  • max_future_days (int)

  • default_snooze_minutes (int)

  • max_retries (int)

  • retry_delay_seconds (int)

max_reminders_per_user: int = 50
max_title_length: int = 200
max_description_length: int = 1000
min_reminder_interval_minutes: int = 5
max_future_days: int = 365
default_snooze_minutes: int = 60
max_retries: int = 3
retry_delay_seconds: int = 60
__init__(max_reminders_per_user=50, max_title_length=200, max_description_length=1000, min_reminder_interval_minutes=5, max_future_days=365, default_snooze_minutes=60, max_retries=3, retry_delay_seconds=60)
פרמטרים:
  • max_reminders_per_user (int)

  • max_title_length (int)

  • max_description_length (int)

  • min_reminder_interval_minutes (int)

  • max_future_days (int)

  • default_snooze_minutes (int)

  • max_retries (int)

  • retry_delay_seconds (int)

Return type:

None

class reminders.models.Reminder(reminder_id, user_id, title, description='', file_name=None, project_name=None, priority=ReminderPriority.MEDIUM, status=ReminderStatus.PENDING, reminder_type=ReminderType.GENERAL, remind_at=<factory>, snooze_until=None, recurrence=RecurrenceType.NONE, recurrence_pattern=None, next_occurrence=None, tags=<factory>, line_number=None, is_sent=False, retry_count=0, last_error=None, completed_at=None, created_at=<factory>, updated_at=<factory>, user_timezone='UTC', chat_id=None)[מקור]

Bases: object

פרמטרים:
reminder_id: str
user_id: int
title: str
description: str = ''
file_name: Optional[str] = None
project_name: Optional[str] = None
priority: ReminderPriority = 'medium'
status: ReminderStatus = 'pending'
reminder_type: ReminderType = 'general'
remind_at: datetime
snooze_until: Optional[datetime] = None
recurrence: RecurrenceType = 'none'
recurrence_pattern: Optional[str] = None
next_occurrence: Optional[datetime] = None
tags: List[str]
line_number: Optional[int] = None
is_sent: bool = False
retry_count: int = 0
last_error: Optional[str] = None
completed_at: Optional[datetime] = None
created_at: datetime
updated_at: datetime
user_timezone: str = 'UTC'
chat_id: Optional[int] = None
validate()[מקור]
Return type:

tuple[bool, str]

to_dict()[מקור]
Return type:

dict

__init__(reminder_id, user_id, title, description='', file_name=None, project_name=None, priority=ReminderPriority.MEDIUM, status=ReminderStatus.PENDING, reminder_type=ReminderType.GENERAL, remind_at=<factory>, snooze_until=None, recurrence=RecurrenceType.NONE, recurrence_pattern=None, next_occurrence=None, tags=<factory>, line_number=None, is_sent=False, retry_count=0, last_error=None, completed_at=None, created_at=<factory>, updated_at=<factory>, user_timezone='UTC', chat_id=None)
פרמטרים:
Return type:

None