Updating the models related to Journals

This commit is contained in:
Scott Idem
2025-03-20 11:58:59 -04:00
parent 0871985f08
commit 579ae9bd96
2 changed files with 72 additions and 24 deletions

View File

@@ -25,7 +25,7 @@ class Journal_Entry_Base(BaseModel):
journal_id_random: Optional[str]
journal_id: Optional[int]
external_id: Optional[str] # ID generated by external system (should be stable and not change)
external_id: Optional[str] # ID generated by or for external systems (should be stable and not change)
import_id: Optional[str] # Used for import purposes to track the source of the data
code: Optional[str]
@@ -40,10 +40,25 @@ class Journal_Entry_Base(BaseModel):
content: Optional[str]
content_html: Optional[str]
content_json: Optional[Union[Json, None]]
content_encrypted: Optional[str]
type_code: Optional[str] # 'log', 'tracking', 'personal', 'professional', etc
topic_code: Optional[str]
category_code: Optional[str]
# keywords: Optional[str]
tags: Optional[str]
start_datetime: Optional[datetime.datetime]
end_datetime: Optional[datetime.datetime]
timezone: Optional[str] # = 'UTC' # Default to UTC
seconds: Optional[int]
location: Optional[str]
latitude: Optional[float]
longitude: Optional[float]
billable: Optional[bool]
bill_to: Optional[str]
alert: Optional[bool] = False
alert_msg: Optional[str] = None
@@ -53,17 +68,26 @@ class Journal_Entry_Base(BaseModel):
personal: Optional[bool] = True
professional: Optional[bool] = False
keywords: Optional[str]
parent_id_random: Optional[str]
parent_id: Optional[int]
related_entry_id_random: Optional[List[str]]
related_entry_id_li: Optional[List[int]]
due_datetime: Optional[datetime.datetime]
due_alert: Optional[bool]
archive_on: Optional[datetime.datetime]
archive: Optional[bool]
data_json: Optional[Union[Json, None]] # Used to store additional data for the journal
passcode: Optional[str] # Used to read and write to the journal entry
passcode_timeout: Optional[int] # Number of seconds before asking for the passcode again
passcode_read: Optional[str] # Used to read the journal entry
passcode_read_expire: Optional[int] # Number of seconds to expire the read passcode
passcode_write: Optional[str] # Used to write to the journal entry
passcode_write_expire: Optional[int] # Number of seconds to expire the write passcode
# passcode_write: Optional[str] # Used to write to the journal entry
# passcode_write_expire: Optional[int] # Number of seconds to expire the write passcode
url_kv_json: Optional[Union[Json, None]]
data_json: Optional[Union[Json, None]] # Used to store additional data for the journal
meta_json: Optional[Union[Json, None]] # Used to store additional data about the journal entry
enable: Optional[bool]
hide: Optional[bool]