lib/legion/data/models/function.rb in legion-data-0.1.1 vs lib/legion/data/models/function.rb in legion-data-0.2.0

- old
+ new

@@ -1,14 +1,17 @@ # frozen_string_literal: true +require_relative 'relationship' + module Legion module Data module Model - # Used for accessing legion.functions class Function < Sequel::Model - many_to_one :namespace - one_to_many :trigger_functions, class: :Relationship, key: :trigger_id - one_to_many :action_functions, class: :Relationship, key: :action_id + many_to_one :runner + one_to_many :trigger_relationships, class: 'Legion::Data::Model::Relationship', key: :trigger_id + one_to_many :action_relationships, class: 'Legion::Data::Model::Relationship', key: :action_id + many_to_one :user_owner, class: Legion::Data::Model::User + many_to_one :group_owner, class: Legion::Data::Model::Group end end end end