unidom-shipment 0.6.1 → 0.6.2
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/README.md +20 -2
- data/app/controllers/unidom/shipment/application_controller.rb +3 -0
- data/app/jobs/unidom/shipment/application_job.rb +3 -0
- data/app/mailers/unidom/shipment/application_mailer.rb +3 -0
- data/app/models/unidom/shipment/application_record.rb +3 -0
- data/app/models/unidom/shipment/shipment.rb +1 -8
- data/app/models/unidom/shipment/shipment_item.rb +1 -1
- data/app/models/unidom/shipment/shipment_package.rb +1 -1
- data/app/models/unidom/shipment/shipment_package_item.rb +1 -1
- data/app/models/unidom/shipment/shipment_receipt.rb +1 -1
- data/app/types/unidom/shipment/conveyance.rb +3 -0
- data/lib/unidom/shipment/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 347ea304d226d488dc4c245530ac07ba4a552b24
|
4
|
+
data.tar.gz: 5378250e4a5421f432256e975e822ef50717c235
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e6b1346f8e53ccab60df0d2ba0da26ffd2cb0ddd1c7df0ad49a7a933e74fc96e7e49c3e555c380abd8e78c920c0f93f86bf855cd5fe12e79a4a919a65f012fc
|
7
|
+
data.tar.gz: 6d90d77d0fb276e997f230282f4769993cf7002ab60f06584f17aaee18a28007aa6b3756736669f11ae3c57641416d322f086dfc7c3f1aff0769ad1595d0bc77
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Unidom Shipment 装运领域模型引擎
|
2
2
|
|
3
|
+
[](http://www.rubydoc.info/gems/unidom-shipment/frames)
|
3
4
|
[](http://opensource.org/licenses/MIT)
|
5
|
+
|
4
6
|
[](https://badge.fury.io/rb/unidom-shipment)
|
5
7
|
[](https://gemnasium.com/github.com/topbitdu/unidom-shipment)
|
6
8
|
|
@@ -56,8 +58,8 @@ include Unidom::Shipment::Concerns::AsShipped
|
|
56
58
|
|
57
59
|
### As Shipped
|
58
60
|
|
59
|
-
The As Shipped concern do the following tasks for the includer automatically:
|
60
|
-
1. Define the has_many :shipment_items macro as: ``has_many :shipment_items, class_name: 'Unidom::Shipment::ShipmentItem', foreign_key: :shipped_id``
|
61
|
+
The As Shipped concern do the following tasks for the includer automatically:
|
62
|
+
1. Define the has_many :shipment_items macro as: ``has_many :shipment_items, class_name: 'Unidom::Shipment::ShipmentItem', foreign_key: :shipped_id``
|
61
63
|
2. Define the has_many :shipment_receipts macro as: ``has_many :shipment_receipts, class_name: 'Unidom::Shipment::ShipmentReceipt', foreign_key: :shipped_id``
|
62
64
|
|
63
65
|
|
@@ -74,3 +76,19 @@ Unidom::Shipment::Conveyance::purchase_return # 进货退回
|
|
74
76
|
Unidom::Shipment::Conveyance::transfer # 转运
|
75
77
|
Unidom::Shipment::Conveyance::drop_shipment # 直接装运
|
76
78
|
```
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
## Disable the Model & Migration
|
83
|
+
|
84
|
+
If you only need the app components other than models, the migrations should be neglected, and the models should not be loaded.
|
85
|
+
```ruby
|
86
|
+
# config/initializers/unidom.rb
|
87
|
+
Unidom::Common.configure do |options|
|
88
|
+
|
89
|
+
options[:neglected_namespaces] = %w{
|
90
|
+
Unidom::Shipment
|
91
|
+
}
|
92
|
+
|
93
|
+
end
|
94
|
+
```
|
@@ -1,12 +1,5 @@
|
|
1
1
|
##
|
2
2
|
# Shipment 是装运。
|
3
|
-
# conveyance_code 是运送代码,可以是以下取值:
|
4
|
-
# CSSP: Customer Shipment 客户装运,把货物发给客户。
|
5
|
-
# CSRT: Customer Return 客户退回,从购买了产品的客户那里把退回的产品运回来。
|
6
|
-
# PCSP: Purchase Shipment 购买装运,从供应商那里把购买的货物运进来。
|
7
|
-
# PCRT: Purchase Return 进货退回,把发来的货物返回给供应商。
|
8
|
-
# TRSF: Transfer 转运,从内部组织到另一个内部组织调拨。
|
9
|
-
# DROP: Drop Shipment 直接装运,销售商把产品从供应商那里直接运送给客户。
|
10
3
|
|
11
4
|
class Unidom::Shipment::Shipment < Unidom::Shipment::ApplicationRecord
|
12
5
|
|
@@ -32,4 +25,4 @@ class Unidom::Shipment::Shipment < Unidom::Shipment::ApplicationRecord
|
|
32
25
|
|
33
26
|
code :conveyance, Unidom::Shipment::Conveyance
|
34
27
|
|
35
|
-
end
|
28
|
+
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Shipment::Shipment'
|
@@ -16,4 +16,4 @@ class Unidom::Shipment::ShipmentPackage < Unidom::Shipment::ApplicationRecord
|
|
16
16
|
|
17
17
|
scope :serial_number_is, ->(serial_number) { where serial_number: serial_number }
|
18
18
|
|
19
|
-
end
|
19
|
+
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Shipment::ShipmentPackage'
|
@@ -12,4 +12,4 @@ class Unidom::Shipment::ShipmentPackageItem < Unidom::Shipment::ApplicationRecor
|
|
12
12
|
belongs_to :package, class_name: 'Unidom::Shipment::ShipmentPackage'
|
13
13
|
belongs_to :shipment_item, class_name: 'Unidom::Shipment::ShipmentItem'
|
14
14
|
|
15
|
-
end
|
15
|
+
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Shipment::ShipmentPackageItem'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-shipment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.9'
|
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.9'
|
27
27
|
description: Unidom (UNIfied Domain Object Model) is a series of domain model engines.
|
28
28
|
The Shipment domain model engine includes the Shipment and the Shipment Item. Unidom
|
29
29
|
(统一领域对象模型)是一系列的领域模型引擎。装运领域模型引擎包括装运和装运项的模型。
|