unidom-product 1.6 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/app/models/unidom/product/concerns/as_source_product.rb +3 -0
- data/app/models/unidom/product/concerns/as_source_product_associating.rb +3 -0
- data/app/models/unidom/product/concerns/as_target_product.rb +3 -0
- data/app/models/unidom/product/concerns/as_target_product_associating.rb +3 -0
- data/app/models/unidom/product/product.rb +1 -0
- data/app/models/unidom/product/product_associating.rb +2 -1
- data/lib/unidom/product/engine.rb +3 -9
- data/lib/unidom/product/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81cb043231dc5c3956a561a22b3374789286db29
|
4
|
+
data.tar.gz: 233a86eca6fe4b792a100f093670acd764c4b873
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac4e1b8e4b16387e074f6196ba162607bb19a6d1a9817074e421e85a88bd9bdf3cd666ebb157e613b68d75945d8235988c78cc75766d0e6edba9598b7269ed6e
|
7
|
+
data.tar.gz: 5078529aa0f3c1708b580b01d1a0ab3b010958275cc7cd91ddb6ac583ee9d41bf0bf17e0aa8a8a74a95030fdd5ecd18a0130da5fafad9ec4efea8f913e892596
|
data/README.md
CHANGED
@@ -84,6 +84,15 @@ The As Target Product concern do the following tasks for the includer automatica
|
|
84
84
|
|
85
85
|
## Enum codes
|
86
86
|
|
87
|
+
### Product Association enum code
|
88
|
+
|
89
|
+
```ruby
|
90
|
+
Unidom::Product::ProductAssociation::COMPLEMENT # 补充
|
91
|
+
Unidom::Product::ProductAssociation::INCOMPATIBILITY # 不兼容
|
92
|
+
Unidom::Product::ProductAssociation::OBSOLESCENCE # 废弃
|
93
|
+
Unidom::Product::ProductAssociation::SUBSTITUTE # 替代
|
94
|
+
```
|
95
|
+
|
87
96
|
### Formset enum code
|
88
97
|
|
89
98
|
```ruby
|
@@ -1,3 +1,4 @@
|
|
1
|
+
##
|
1
2
|
# Product Associating 表示产品之间的关联。常见的关联包括销售包装、产品换代等。
|
2
3
|
# source 是来源产品。如组合后的产品、被换代的产品、不兼容产品中的主产品。
|
3
4
|
# target 是目标产品。如参与组合的产品、替换其它产品的新产品、不兼容产品中的次要产品。
|
@@ -8,7 +9,7 @@
|
|
8
9
|
# PCKG 是销售包装(行销组件) package: quantity, usage
|
9
10
|
# SBST 是产品替代 substitute: from, thru, quantity, comments
|
10
11
|
# 构成: from, thru, quantity, usage, comments
|
11
|
-
#
|
12
|
+
#
|
12
13
|
|
13
14
|
class Unidom::Product::ProductAssociating < Unidom::Product::ApplicationRecord
|
14
15
|
|
@@ -1,19 +1,13 @@
|
|
1
|
-
require 'unidom/common/yaml_helper'
|
2
|
-
|
3
1
|
module Unidom
|
4
2
|
module Product
|
5
3
|
|
6
4
|
class Engine < ::Rails::Engine
|
7
5
|
|
8
|
-
|
6
|
+
include Unidom::Common::EngineExtension
|
9
7
|
|
10
|
-
|
11
|
-
Unidom::Common::YamlHelper.load_enum config: app.config, root: config.root
|
12
|
-
end
|
8
|
+
isolate_namespace ::Unidom::Product
|
13
9
|
|
14
|
-
|
15
|
-
config.paths['db/migrate'].expanded.each { |expanded_path| app.config.paths['db/migrate'] << expanded_path } unless app.root.to_s.match root.to_s
|
16
|
-
end
|
10
|
+
enable_initializer enum_enabled: true, migration_enabled: true
|
17
11
|
|
18
12
|
end
|
19
13
|
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-product
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: '1.8'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: '1.8'
|
27
27
|
description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
|
28
28
|
The Product domain model engine includes Product and its relative models. Unidom
|
29
29
|
(统一领域对象模型)是一系列的领域模型引擎。产品领域模型引擎包括产品及其相关的模型。
|