Updating the models related to Journals
This commit is contained in:
@@ -25,7 +25,7 @@ class Journal_Entry_Base(BaseModel):
|
|||||||
journal_id_random: Optional[str]
|
journal_id_random: Optional[str]
|
||||||
journal_id: Optional[int]
|
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
|
import_id: Optional[str] # Used for import purposes to track the source of the data
|
||||||
code: Optional[str]
|
code: Optional[str]
|
||||||
|
|
||||||
@@ -40,10 +40,25 @@ class Journal_Entry_Base(BaseModel):
|
|||||||
content: Optional[str]
|
content: Optional[str]
|
||||||
content_html: Optional[str]
|
content_html: Optional[str]
|
||||||
content_json: Optional[Union[Json, None]]
|
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]
|
start_datetime: Optional[datetime.datetime]
|
||||||
end_datetime: Optional[datetime.datetime]
|
end_datetime: Optional[datetime.datetime]
|
||||||
timezone: Optional[str] # = 'UTC' # Default to UTC
|
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: Optional[bool] = False
|
||||||
alert_msg: Optional[str] = None
|
alert_msg: Optional[str] = None
|
||||||
@@ -53,17 +68,26 @@ class Journal_Entry_Base(BaseModel):
|
|||||||
personal: Optional[bool] = True
|
personal: Optional[bool] = True
|
||||||
professional: Optional[bool] = False
|
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_on: Optional[datetime.datetime]
|
||||||
archive: Optional[bool]
|
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: Optional[str] # Used to read the journal entry
|
||||||
passcode_read_expire: Optional[int] # Number of seconds to expire the read passcode
|
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: Optional[str] # Used to write to the journal entry
|
||||||
passcode_write_expire: Optional[int] # Number of seconds to expire the write passcode
|
# 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]
|
enable: Optional[bool]
|
||||||
hide: Optional[bool]
|
hide: Optional[bool]
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class Journal_Base(BaseModel):
|
|||||||
user_id_random: Optional[str]
|
user_id_random: Optional[str]
|
||||||
user_id: Optional[int]
|
user_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
|
import_id: Optional[str] # Used for import purposes to track the source of the data
|
||||||
code: Optional[str]
|
code: Optional[str]
|
||||||
|
|
||||||
@@ -40,21 +40,6 @@ class Journal_Base(BaseModel):
|
|||||||
for_id: Optional[int]
|
for_id: Optional[int]
|
||||||
for_id_random: Optional[str]
|
for_id_random: Optional[str]
|
||||||
|
|
||||||
type_code: Optional[str] # 'log', 'tracking', 'personal', 'professional', etc
|
|
||||||
|
|
||||||
default_private: Optional[bool]
|
|
||||||
default_public: Optional[bool]
|
|
||||||
default_personal: Optional[bool]
|
|
||||||
default_professional: Optional[bool]
|
|
||||||
|
|
||||||
private_passcode: Optional[str]
|
|
||||||
public_passcode: Optional[str]
|
|
||||||
|
|
||||||
passcode_read: Optional[str] # Used to read the journal
|
|
||||||
passcode_read_expire: Optional[int] # Number of seconds to expire the read passcode
|
|
||||||
passcode_write: Optional[str] # Used to write to the journal
|
|
||||||
passcode_write_expire: Optional[int] # Number of seconds to expire the write passcode
|
|
||||||
|
|
||||||
name: Optional[str]
|
name: Optional[str]
|
||||||
summary: Optional[str]
|
summary: Optional[str]
|
||||||
outline: Optional[str]
|
outline: Optional[str]
|
||||||
@@ -63,21 +48,59 @@ class Journal_Base(BaseModel):
|
|||||||
description_html: Optional[str]
|
description_html: Optional[str]
|
||||||
description_json: Optional[str]
|
description_json: Optional[str]
|
||||||
|
|
||||||
|
type_code: Optional[str] # 'log', 'tracking', 'personal', 'professional', etc
|
||||||
|
tags: Optional[str]
|
||||||
|
|
||||||
start_datetime: Optional[datetime.datetime]
|
start_datetime: Optional[datetime.datetime]
|
||||||
end_datetime: Optional[datetime.datetime]
|
end_datetime: Optional[datetime.datetime]
|
||||||
timezone: Optional[str] # = 'UTC' # Default to UTC
|
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: Optional[bool] = False
|
||||||
alert_msg: Optional[str] = None
|
alert_msg: Optional[str] = None
|
||||||
|
|
||||||
meta_data: Optional[str]
|
private: Optional[bool] = True
|
||||||
access_key: Optional[str]
|
public: Optional[bool] = False
|
||||||
|
personal: Optional[bool] = True
|
||||||
|
professional: Optional[bool] = False
|
||||||
|
|
||||||
|
# Default the Journal Entries to private, public, personal, and professional
|
||||||
|
default_private: Optional[bool]
|
||||||
|
default_public: Optional[bool]
|
||||||
|
default_personal: Optional[bool]
|
||||||
|
default_professional: Optional[bool]
|
||||||
|
|
||||||
|
due_datetime: Optional[datetime.datetime]
|
||||||
|
due_alert: Optional[bool]
|
||||||
|
archive_on: Optional[datetime.datetime]
|
||||||
|
archive: Optional[bool]
|
||||||
|
|
||||||
|
allow_auth: Optional[bool]
|
||||||
|
auth_key: Optional[str]
|
||||||
|
|
||||||
|
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
|
||||||
|
# private_passcode: Optional[str]
|
||||||
|
# public_passcode: Optional[str]
|
||||||
|
|
||||||
|
passcode_read: Optional[str] # Used to read the journal
|
||||||
|
passcode_read_expire: Optional[int] # Number of seconds to expire the read passcode
|
||||||
|
# passcode_write: Optional[str] # Used to write to the journal
|
||||||
|
# passcode_write_expire: Optional[int] # Number of seconds to expire the write passcode
|
||||||
|
|
||||||
sort_by: Optional[str]
|
sort_by: Optional[str]
|
||||||
sort_by_desc: Optional[bool]
|
sort_by_desc: Optional[bool]
|
||||||
|
|
||||||
cfg_json: Optional[Union[Json, None]]
|
cfg_json: Optional[Union[Json, None]]
|
||||||
data_json: Optional[Union[Json, None]] # Used to store additional data for the journal
|
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 for about the journal
|
||||||
|
|
||||||
enable: Optional[bool]
|
enable: Optional[bool]
|
||||||
hide: Optional[bool]
|
hide: Optional[bool]
|
||||||
@@ -95,6 +118,7 @@ class Journal_Base(BaseModel):
|
|||||||
file_count: Optional[int] # Only files directly under the journal
|
file_count: Optional[int] # Only files directly under the journal
|
||||||
file_count_all: Optional[int] # All files under a journal and entries
|
file_count_all: Optional[int] # All files under a journal and entries
|
||||||
|
|
||||||
|
# This person is essentially the owner of the journal
|
||||||
# person: Optional[Person_Base]
|
# person: Optional[Person_Base]
|
||||||
person_external_id: Optional[str]
|
person_external_id: Optional[str]
|
||||||
person_given_name: Optional[str] = None
|
person_given_name: Optional[str] = None
|
||||||
|
|||||||
Reference in New Issue
Block a user