raw_store_events store started

This commit is contained in:
2025-12-24 00:55:22 -07:00
parent cdbc08dea2
commit 3823fa7331
17 changed files with 363 additions and 73 deletions
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

+28 -44
View File
@@ -1,56 +1,40 @@
@startuml
object store_events
store_events : platform
store_events : store_id
store_events : event_id
store_events : event_timestamp
store_events : tiktok_store_id
store_events : tiktok_event_id
store_events : <platform B>_store_id
store_events : <platform B>_event_id
store_events : <platform C>_store_id
store_events : <platform C>_event_id
store_events : <platform ..>_store_id
store_events : <platform ..>_event_id
store_events : raw payload?
object raw_store_events
raw_store_events : platform text
raw_store_events : store_id text
raw_store_events : event_id text
raw_store_events : event_timestamp timestamptz
raw_store_events : raw_payload jsonb
raw_store_events : parsed boolean
note right of store_events::"tiktok_event_id"
reference tiktok_store_event_details
end note
note right of store_events::"<platform B>_event_id"
reference <platform B>_store_event_details
end note
note right of store_events::"<platform C>_event_id"
reference <platform C>_store_event_details
end note
note right of store_events::"<platform ..>_event_id"
only one reference can exist at a time
(eg event CANNOT be both from tiktok AND etsy)
note right of raw_store_events::"parsed"
indicates if the raw_payload has been parsed
and stored in one of the referencing tables
end note
object tiktok_store_event_details
tiktok_store_event_details : store_id
tiktok_store_event_details : event_id
tiktok_store_event_details : event_timestamp
tiktok_store_event_details : [attribute: value ...]
object tiktok_store_events
tiktok_store_events : store_id text
tiktok_store_events : event_id text
tiktok_store_events : event_timestamp timestamptz
tiktok_store_events : [attribute: value ...]
object "<platform B>_store_event_details" as platform_b_specific_store_event_details
platform_b_specific_store_event_details : store_id
platform_b_specific_store_event_details : event_id
platform_b_specific_store_event_details : event_timestamp
platform_b_specific_store_event_details : [attribute: value ...]
object etsy_store_events
etsy_store_events : store_id text
etsy_store_events : event_id text
etsy_store_events : event_timestamp timestamptz
etsy_store_events : [attribute: value ...]
object "<platform C>_store_event_details" as platform_c_specific_store_event_details
platform_c_specific_store_event_details : store_id
platform_c_specific_store_event_details : event_id
platform_c_specific_store_event_details : event_timestamp
platform_c_specific_store_event_details : [attribute: value ...]
object etc_store_events
etc_store_events : store_id text
etc_store_events : event_id text
etc_store_events : event_timestamp timestamptz
etc_store_events : [attribute: value ...]
store_events <|-- tiktok_store_event_details
store_events <|-- platform_b_specific_store_event_details
store_events <|-- platform_c_specific_store_event_details
raw_store_events <|-- tiktok_store_events : (store_id, event_id)
raw_store_events <|-- etsy_store_events : (store_id, event_id)
raw_store_events <|-- etc_store_events : (store_id, event_id)
@enduml
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

+56
View File
@@ -0,0 +1,56 @@
@startuml
object store_events
store_events : platform
store_events : store_id
store_events : event_id
store_events : event_timestamp
store_events : tiktok_store_id
store_events : tiktok_event_id
store_events : <platform B>_store_id
store_events : <platform B>_event_id
store_events : <platform C>_store_id
store_events : <platform C>_event_id
store_events : <platform ..>_store_id
store_events : <platform ..>_event_id
store_events : raw payload?
note right of store_events::"tiktok_event_id"
reference tiktok_store_event_details
end note
note right of store_events::"<platform B>_event_id"
reference <platform B>_store_event_details
end note
note right of store_events::"<platform C>_event_id"
reference <platform C>_store_event_details
end note
note right of store_events::"<platform ..>_event_id"
only one reference can exist at a time
(eg event CANNOT be both from tiktok AND etsy)
end note
object tiktok_store_event_details
tiktok_store_event_details : store_id
tiktok_store_event_details : event_id
tiktok_store_event_details : event_timestamp
tiktok_store_event_details : [attribute: value ...]
object "<platform B>_store_event_details" as platform_b_specific_store_event_details
platform_b_specific_store_event_details : store_id
platform_b_specific_store_event_details : event_id
platform_b_specific_store_event_details : event_timestamp
platform_b_specific_store_event_details : [attribute: value ...]
object "<platform C>_store_event_details" as platform_c_specific_store_event_details
platform_c_specific_store_event_details : store_id
platform_c_specific_store_event_details : event_id
platform_c_specific_store_event_details : event_timestamp
platform_c_specific_store_event_details : [attribute: value ...]
store_events <|-- tiktok_store_event_details
store_events <|-- platform_b_specific_store_event_details
store_events <|-- platform_c_specific_store_event_details
@enduml