item_models 0.0.1 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/item_models.rb +1 -0
- data/lib/item_models/version.rb +1 -1
- data/lib/models/activity.rb +1 -1
- data/lib/models/availability_option.rb +1 -1
- data/lib/models/bundle.rb +5 -1
- data/lib/models/bundle_variant.rb +4 -1
- data/lib/models/image.rb +7 -1
- data/lib/models/item.rb +5 -1
- data/lib/models/item_application_record.rb +6 -0
- data/lib/models/item_listing.rb +9 -1
- data/lib/models/item_listing_brand.rb +3 -1
- data/lib/models/item_listing_category.rb +3 -1
- data/lib/models/item_listing_custom_field.rb +4 -1
- data/lib/models/item_listing_image.rb +3 -1
- data/lib/models/item_listing_variant_custom_field.rb +5 -1
- data/lib/models/item_listing_variant_image.rb +1 -1
- data/lib/models/master_catalog.rb +4 -1
- data/lib/models/master_catalog_image.rb +4 -1
- data/lib/models/variant.rb +9 -1
- data/lib/models/variant_image.rb +4 -1
- data/lib/models/variant_listing.rb +6 -1
- data/lib/models/variant_listing_price_history.rb +3 -1
- data/lib/models/variant_listing_stock_allocation.rb +3 -1
- data/lib/models/variant_option.rb +3 -1
- data/lib/models/variant_option_association.rb +3 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 820422d0524d4604444fa41f0e4dc598e5cfb75dcbccdfced3febc051c9b1efa
|
4
|
+
data.tar.gz: 9579065ab3a09ed3f38023c8db64722a9b35362ba579aa60ea1006c74cf3737a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f09629748137014df85d12ceb6ed1c8711bcf47b1f0eff02faebcdc9f7473eac7c3ea17903bd4713f019140ad76e7dba7c991531f6113f1ffcf9ade634ea959
|
7
|
+
data.tar.gz: 484b8b70b5300129be91b0b57c8540c5b97ae81fa44394c1563f708c710b451ac5d36453c70e5fc67a9c098e58a8605be73156a1ed06381fa6d85bac45bda249
|
data/lib/item_models.rb
CHANGED
data/lib/item_models/version.rb
CHANGED
data/lib/models/activity.rb
CHANGED
data/lib/models/bundle.rb
CHANGED
data/lib/models/image.rb
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class Image <
|
3
|
+
class Image < ItemApplicationRecord
|
4
4
|
self.table_name = 'item_images'
|
5
|
+
|
6
|
+
belongs_to :item
|
7
|
+
has_many :item_listing_images
|
8
|
+
has_many :variant_images, foreign_key: :item_image_id
|
9
|
+
has_many :master_catalog_images
|
10
|
+
has_many :item_listing_variant_custom_fields
|
5
11
|
end
|
data/lib/models/item.rb
CHANGED
data/lib/models/item_listing.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class ItemListing <
|
3
|
+
class ItemListing < ItemApplicationRecord
|
4
4
|
self.table_name = 'item_channel_associations'
|
5
|
+
belongs_to :item
|
6
|
+
has_many :variant_listings, foreign_key: :channel_association_id
|
7
|
+
has_many :item_listing_images, foreign_key: :channel_association_id
|
8
|
+
has_many :item_listing_categories, foreign_key: :channel_association_id
|
9
|
+
has_many :item_listing_brands, foreign_key: :channel_association_id
|
10
|
+
has_many :item_listing_variant_custom_fields, foreign_key: :channel_association_id
|
11
|
+
has_many :item_listing_custom_fields, foreign_key: :channel_association_id
|
12
|
+
has_many :item_listing_variant_images, foreign_key: :channel_association_id
|
5
13
|
end
|
@@ -1,5 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class ItemListingCustomField <
|
3
|
+
class ItemListingCustomField < ItemApplicationRecord
|
4
4
|
self.table_name = 'item_channel_association_custom_fields'
|
5
|
+
|
6
|
+
belongs_to :item_listing, foreign_key: :channel_association_id
|
7
|
+
belongs_to :variant
|
5
8
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class ItemListingImage <
|
3
|
+
class ItemListingImage < ItemApplicationRecord
|
4
4
|
self.table_name = 'item_channel_association_images'
|
5
|
+
belongs_to :image
|
6
|
+
belongs_to :item_listing, foreign_key: :channel_association_id
|
5
7
|
end
|
@@ -1,5 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class ItemListingVariantCustomField <
|
3
|
+
class ItemListingVariantCustomField < ItemApplicationRecord
|
4
4
|
self.table_name = 'item_channel_association_variant_images'
|
5
|
+
|
6
|
+
belongs_to :item_listing, foreign_key: :channel_association_id
|
7
|
+
belongs_to :variant
|
8
|
+
belongs_to :image
|
5
9
|
end
|
@@ -1,5 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class MasterCatalogImage <
|
3
|
+
class MasterCatalogImage < ItemApplicationRecord
|
4
4
|
self.table_name = 'item_variant_master_image_assocs'
|
5
|
+
|
6
|
+
belongs_to :master_catalog, foreign_key: :master_assoc_id
|
7
|
+
belongs_to :image, foreign_key: :image_id
|
5
8
|
end
|
data/lib/models/variant.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class Variant <
|
3
|
+
class Variant < ItemApplicationRecord
|
4
4
|
self.table_name = 'item_variants'
|
5
|
+
belongs_to :item
|
6
|
+
has_many :variant_images, foreign_key: :item_variant_id
|
7
|
+
has_many :bundles
|
8
|
+
has_many :variant_listings, foreign_key: :variant_id
|
9
|
+
has_many :item_listing_variant_images, foreign_key: :variant_id
|
10
|
+
has_many :item_listing_variant_custom_field, foreign_key: :variant_id
|
11
|
+
has_many :item_listing_custom_field, foreign_key: :variant_id
|
12
|
+
has_one :master_catalog, foreign_key: :variant_id
|
5
13
|
end
|
data/lib/models/variant_image.rb
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class VariantListing <
|
3
|
+
class VariantListing < ItemApplicationRecord
|
4
4
|
self.table_name = 'item_channel_association_variant_associations'
|
5
|
+
|
6
|
+
belongs_to :variant
|
7
|
+
belongs_to :item_listing
|
8
|
+
has_many :variant_listing_stock_allocations, foreign_key: :variant_association_id
|
9
|
+
has_many :variant_listing_price_histories, foreign_key: :variant_association_id
|
5
10
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class VariantListingPriceHistory <
|
3
|
+
class VariantListingPriceHistory < ItemApplicationRecord
|
4
4
|
self.table_name = 'item_channel_association_variant_association_stock_allocations'
|
5
|
+
|
6
|
+
belongs_to :variant_listing, foreign_key: :variant_association_id
|
5
7
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
class VariantListingStockAllocation <
|
3
|
+
class VariantListingStockAllocation < ItemApplicationRecord
|
4
4
|
self.table_name = 'item_channel_association_variant_association_stock_allocations'
|
5
|
+
|
6
|
+
belongs_to :variant_listing, foreign_key: :variant_association_id
|
5
7
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: item_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alexander
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- lib/models/bundle_variant.rb
|
68
68
|
- lib/models/image.rb
|
69
69
|
- lib/models/item.rb
|
70
|
+
- lib/models/item_application_record.rb
|
70
71
|
- lib/models/item_listing.rb
|
71
72
|
- lib/models/item_listing_brand.rb
|
72
73
|
- lib/models/item_listing_category.rb
|