Class: ForestAdminDatasourceToolkit::Schema::Relations::OneToManySchema

Inherits:
ForestAdminDatasourceToolkit::Schema::RelationSchema show all
Defined in:
lib/forest_admin_datasource_toolkit/schema/relations/one_to_many_schema.rb

Instance Attribute Summary collapse

Attributes inherited from ForestAdminDatasourceToolkit::Schema::RelationSchema

#foreign_collection, #type

Instance Method Summary collapse

Constructor Details

#initialize(origin_key:, origin_key_target:, foreign_collection:) ⇒ OneToManySchema

Returns a new instance of OneToManySchema.



7
8
9
10
11
# File 'lib/forest_admin_datasource_toolkit/schema/relations/one_to_many_schema.rb', line 7

def initialize(origin_key:, origin_key_target:, foreign_collection:)
  super(foreign_collection, 'OneToMany')
  @origin_key = origin_key
  @origin_key_target = origin_key_target
end

Instance Attribute Details

#origin_keyObject

Returns the value of attribute origin_key.



5
6
7
# File 'lib/forest_admin_datasource_toolkit/schema/relations/one_to_many_schema.rb', line 5

def origin_key
  @origin_key
end

#origin_key_targetObject

Returns the value of attribute origin_key_target.



5
6
7
# File 'lib/forest_admin_datasource_toolkit/schema/relations/one_to_many_schema.rb', line 5

def origin_key_target
  @origin_key_target
end