database.bookmark module

Bookmark Model for file line bookmarks

class database.bookmark.FileBookmark(user_id, file_id, file_name, file_path, line_number, line_text_preview='', code_context='', note='', color='yellow', anchor_id='', anchor_text='', anchor_type='', file_hash='', valid=True, sync_status='synced', sync_confidence=1.0, created_at=<factory>, updated_at=<factory>, last_accessed=None, _id=None)[מקור]

Bases: object

מודל סימנייה לשורה בקובץ קוד

פרמטרים:
user_id: int
file_id: str
file_name: str
file_path: str
line_number: int
line_text_preview: str = ''
code_context: str = ''
note: str = ''
color: str = 'yellow'
anchor_id: str = ''
anchor_text: str = ''
anchor_type: str = ''
file_hash: str = ''
valid: bool = True
sync_status: str = 'synced'
sync_confidence: float = 1.0
created_at: datetime
updated_at: datetime
last_accessed: Optional[datetime] = None
to_dict()[מקור]

המרה ל-dictionary לשמירה ב-MongoDB

Return type:

Dict[str, Any]

classmethod from_dict(data)[מקור]

יצירה מ-dictionary שהגיע מ-MongoDB

Return type:

FileBookmark

פרמטרים:

data (Dict[str, Any])

__init__(user_id, file_id, file_name, file_path, line_number, line_text_preview='', code_context='', note='', color='yellow', anchor_id='', anchor_text='', anchor_type='', file_hash='', valid=True, sync_status='synced', sync_confidence=1.0, created_at=<factory>, updated_at=<factory>, last_accessed=None, _id=None)
פרמטרים:
Return type:

None