zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

commit 3a0b7e70d60ea3183e5ee8262505aa89d4473dff
parent e87267a981390b4a076a0d4287d757c546c596ba
Author: srfsh <dev@srf.sh>
Date:   Wed,  6 Jul 2022 23:13:08 +0200

vf/process: add has_many event associations

Diffstat:
Msrc/zenflows/vf/process.ex | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/zenflows/vf/process.ex b/src/zenflows/vf/process.ex @@ -7,6 +7,7 @@ transport economic resource(s). use Zenflows.DB.Schema alias Zenflows.VF.{ + EconomicEvent, Plan, ProcessSpecification, Scenario, @@ -38,6 +39,9 @@ schema "vf_process" do # belongs_to :in_scope_of belongs_to :planned_within, Plan belongs_to :nested_in, Scenario + + has_many :inputs, EconomicEvent, foreign_key: :input_of_id + has_many :outputs, EconomicEvent, foreign_key: :output_of_id end @reqr [:name]