Class: ForestAdminDatasourceToolkit::Schema::Relations::ManyToManySchema
- Inherits:
-
ForestAdminDatasourceToolkit::Schema::RelationSchema
- Object
- ForestAdminDatasourceToolkit::Schema::RelationSchema
- ForestAdminDatasourceToolkit::Schema::Relations::ManyToManySchema
- Defined in:
- lib/forest_admin_datasource_toolkit/schema/relations/many_to_many_schema.rb
Instance Attribute Summary collapse
-
#foreign_key ⇒ Object
Returns the value of attribute foreign_key.
-
#foreign_key_target ⇒ Object
Returns the value of attribute foreign_key_target.
-
#origin_key ⇒ Object
Returns the value of attribute origin_key.
-
#origin_key_target ⇒ Object
Returns the value of attribute origin_key_target.
-
#origin_type_field ⇒ Object
Returns the value of attribute origin_type_field.
-
#origin_type_value ⇒ Object
Returns the value of attribute origin_type_value.
-
#through_collection ⇒ Object
Returns the value of attribute through_collection.
Attributes inherited from ForestAdminDatasourceToolkit::Schema::RelationSchema
Instance Method Summary collapse
-
#initialize(origin_key:, origin_key_target:, foreign_key:, foreign_key_target:, foreign_collection:, through_collection:, origin_type_field: nil, origin_type_value: nil) ⇒ ManyToManySchema
constructor
A new instance of ManyToManySchema.
Constructor Details
#initialize(origin_key:, origin_key_target:, foreign_key:, foreign_key_target:, foreign_collection:, through_collection:, origin_type_field: nil, origin_type_value: nil) ⇒ ManyToManySchema
Returns a new instance of ManyToManySchema.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/many_to_many_schema.rb', line 8 def initialize( origin_key:, origin_key_target:, foreign_key:, foreign_key_target:, foreign_collection:, through_collection:, origin_type_field: nil, origin_type_value: nil ) super(foreign_collection, 'ManyToMany') @origin_key = origin_key @origin_key_target = origin_key_target @through_collection = through_collection @foreign_key = foreign_key @foreign_key_target = foreign_key_target @origin_type_field = origin_type_field @origin_type_value = origin_type_value end |
Instance Attribute Details
#foreign_key ⇒ Object
Returns the value of attribute foreign_key.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/many_to_many_schema.rb', line 5 def foreign_key @foreign_key end |
#foreign_key_target ⇒ Object
Returns the value of attribute foreign_key_target.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/many_to_many_schema.rb', line 5 def foreign_key_target @foreign_key_target end |
#origin_key ⇒ Object
Returns the value of attribute origin_key.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/many_to_many_schema.rb', line 5 def origin_key @origin_key end |
#origin_key_target ⇒ Object
Returns the value of attribute origin_key_target.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/many_to_many_schema.rb', line 5 def origin_key_target @origin_key_target end |
#origin_type_field ⇒ Object
Returns the value of attribute origin_type_field.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/many_to_many_schema.rb', line 5 def origin_type_field @origin_type_field end |
#origin_type_value ⇒ Object
Returns the value of attribute origin_type_value.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/many_to_many_schema.rb', line 5 def origin_type_value @origin_type_value end |
#through_collection ⇒ Object
Returns the value of attribute through_collection.
5 6 7 |
# File 'lib/forest_admin_datasource_toolkit/schema/relations/many_to_many_schema.rb', line 5 def through_collection @through_collection end |