commit cbb7df9a581b4885d527c1334dbc2995da3de41b
parent 5684d7380f6d16d9a42eaf69ec2ac2187f5d62cf
Author: srfsh <dev@srf.sh>
Date: Sun, 20 Nov 2022 23:15:45 +0300
Zenflows.VF.EconomicEvent.Type: introduce the union TrackTraceItem
It'll be used to represent individual track/trace data in a list.
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/zenflows/vf/economic_event/type.ex b/src/zenflows/vf/economic_event/type.ex
@@ -110,6 +110,15 @@ union :production_flow_item do
end
end
+union :track_trace_item do
+ types [:process, :economic_event, :economic_resource]
+ resolve_type fn
+ %Process{}, _ -> :process
+ %EconomicEvent{}, _ -> :economic_event
+ %EconomicResource{}, _ -> :economic_resource
+ end
+end
+
@desc """
An observed economic flow, as opposed to a flow planned to happen in
the future. This could reflect a change in the quantity of an economic