unidom-inventory 2.0 → 2.0.1
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/app/controllers/unidom/inventory/application_controller.rb +8 -2
- data/app/helpers/unidom/inventory/application_helper.rb +7 -1
- data/app/jobs/unidom/inventory/application_job.rb +7 -1
- data/app/mailers/unidom/inventory/application_mailer.rb +9 -3
- data/app/models/unidom/inventory/application_record.rb +8 -2
- data/app/models/unidom/inventory/concerns/as_inventory_item.rb +31 -23
- data/app/models/unidom/inventory/concerns/as_store.rb +16 -8
- data/app/models/unidom/inventory/concerns/as_stored.rb +16 -8
- data/app/models/unidom/inventory/grouped_inventory_item.rb +12 -6
- data/app/models/unidom/inventory/inventory_item_variance.rb +38 -32
- data/app/models/unidom/inventory/item_issuing.rb +14 -8
- data/app/models/unidom/inventory/lot.rb +14 -8
- data/app/models/unidom/inventory/pick_item.rb +13 -7
- data/app/models/unidom/inventory/pick_list.rb +11 -5
- data/app/models/unidom/inventory/serialized_inventory_item.rb +12 -6
- data/db/migrate/20020901000000_create_unidom_serialized_inventory_items.rb +3 -3
- data/db/migrate/20020902000000_create_unidom_grouped_inventory_items.rb +3 -3
- data/db/migrate/20020903000000_create_unidom_inventory_item_variances.rb +2 -2
- data/db/migrate/20020911000000_create_unidom_lots.rb +2 -2
- data/db/migrate/20020921000000_create_unidom_pick_lists.rb +2 -2
- data/db/migrate/20020922000000_create_unidom_pick_items.rb +3 -3
- data/db/migrate/20020923000000_create_unidom_item_issuings.rb +3 -3
- data/lib/unidom/inventory/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3ad528a0044425394ae08209db37dc08a765126c7cd5cde6542324cc71505ac
|
4
|
+
data.tar.gz: 8e33f180fbf7408839e65863e728a5413a70080e0f56b86435ea27712976fd4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74ac13809d430a0dac0eb72347eab053cf8cf7d4308092e9a50bfcf02f041495473c00813395d93d80db22e52de30f9d2f9576069f86ec1632b4d5cb242650c9
|
7
|
+
data.tar.gz: 25d8a0491784b082cec356d239029e6ab5bbaddcd503b8fbb1b3af93f7ba293eb9e11237bc3ee509a44269d3481eaab4d7831abe11ec3579ee19ad09ee0ddf92
|
@@ -1,6 +1,12 @@
|
|
1
1
|
##
|
2
2
|
# Application controller 是模块内所有控制器的基类。
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
module Unidom
|
5
|
+
module Inventory
|
6
|
+
|
7
|
+
class ApplicationController < ActionController::Base
|
8
|
+
protect_from_forgery with: :exception
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
6
12
|
end
|
@@ -1,7 +1,13 @@
|
|
1
1
|
##
|
2
2
|
# Application mailer 是模块内所有电子邮件发送类的基类。
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
module Unidom
|
5
|
+
module Inventory
|
6
|
+
|
7
|
+
class ApplicationMailer < ActionMailer::Base
|
8
|
+
default from: 'from@example.com'
|
9
|
+
layout 'mailer'
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
7
13
|
end
|
@@ -1,6 +1,12 @@
|
|
1
1
|
##
|
2
2
|
# Application record 是模块内所有模型的抽象基类。
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
module Unidom
|
5
|
+
module Inventory
|
6
|
+
|
7
|
+
class ApplicationRecord < ActiveRecord::Base
|
8
|
+
self.abstract_class = true
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
6
12
|
end
|
@@ -1,33 +1,41 @@
|
|
1
|
-
module Unidom
|
1
|
+
module Unidom
|
2
|
+
module Inventory
|
3
|
+
module Concerns
|
2
4
|
|
3
|
-
|
5
|
+
module AsInventoryItem
|
4
6
|
|
5
|
-
|
7
|
+
extend ActiveSupport::Concern
|
6
8
|
|
7
|
-
|
8
|
-
belongs_to :store, polymorphic: true
|
9
|
-
belongs_to :lot, class_name: 'Unidom::Inventory::Lot'
|
9
|
+
included do |includer|
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
belongs_to :stored, polymorphic: true
|
12
|
+
belongs_to :store, polymorphic: true
|
13
|
+
belongs_to :lot, class_name: 'Unidom::Inventory::Lot'
|
14
|
+
|
15
|
+
has_many :pick_items, class_name: 'Unidom::Inventory::PickItem', as: :inventory_item
|
16
|
+
has_many :variances, class_name: 'Unidom::Inventory::InventoryItemVariance', as: :inventory_item
|
17
|
+
|
18
|
+
def is_adjusted!(quantity: nil, due_to: nil, at: Time.now, description: nil, instruction: nil)
|
19
|
+
if respond_to? :quantity
|
20
|
+
increment! :quantity, quantity
|
21
|
+
else
|
22
|
+
if quantity.nil?
|
23
|
+
quantity = -1
|
24
|
+
soft_destroy
|
25
|
+
else
|
26
|
+
raise ArgumentError.new('The quantity should be nil when Inventory Item Variance is adjusted.')
|
27
|
+
end
|
28
|
+
end
|
29
|
+
variances.create! inventory_item: self, reason: due_to, quantity: quantity, description: description, instruction: instruction, opened_at: at
|
30
|
+
end
|
13
31
|
|
14
|
-
def is_adjusted!(quantity: nil, due_to: nil, at: Time.now, description: nil, instruction: nil)
|
15
|
-
if respond_to? :quantity
|
16
|
-
increment! :quantity, quantity
|
17
|
-
else
|
18
|
-
if quantity.nil?
|
19
|
-
quantity = -1
|
20
|
-
soft_destroy
|
21
|
-
else
|
22
|
-
raise ArgumentError.new('The quantity should be nil when Inventory Item Variance is adjusted.')
|
23
32
|
end
|
24
|
-
end
|
25
|
-
variances.create! inventory_item: self, reason: due_to, quantity: quantity, description: description, instruction: instruction, opened_at: at
|
26
|
-
end
|
27
33
|
|
28
|
-
|
34
|
+
module ClassMethods
|
35
|
+
end
|
29
36
|
|
30
|
-
|
31
|
-
end
|
37
|
+
end
|
32
38
|
|
39
|
+
end
|
40
|
+
end
|
33
41
|
end
|
@@ -1,15 +1,23 @@
|
|
1
|
-
module Unidom
|
1
|
+
module Unidom
|
2
|
+
module Inventory
|
3
|
+
module Concerns
|
2
4
|
|
3
|
-
|
5
|
+
module AsStore
|
4
6
|
|
5
|
-
|
7
|
+
extend ActiveSupport::Concern
|
6
8
|
|
7
|
-
|
8
|
-
has_many :serialized_inventory_items, class_name: 'Unidom::Inventory::SerializedInventoryItem', foreign_key: :store_id
|
9
|
+
included do |includer|
|
9
10
|
|
10
|
-
|
11
|
+
has_many :grouped_inventory_items, class_name: 'Unidom::Inventory::GroupedInventoryItem', foreign_key: :store_id
|
12
|
+
has_many :serialized_inventory_items, class_name: 'Unidom::Inventory::SerializedInventoryItem', foreign_key: :store_id
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
+
end
|
15
|
+
|
16
|
+
module ClassMethods
|
17
|
+
end
|
14
18
|
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
15
23
|
end
|
@@ -1,15 +1,23 @@
|
|
1
|
-
module Unidom
|
1
|
+
module Unidom
|
2
|
+
module Inventory
|
3
|
+
module Concerns
|
2
4
|
|
3
|
-
|
5
|
+
module AsStored
|
4
6
|
|
5
|
-
|
7
|
+
extend ActiveSupport::Concern
|
6
8
|
|
7
|
-
|
8
|
-
has_many :serialized_inventory_items, class_name: 'Unidom::Inventory::SerializedInventoryItem', foreign_key: :stored_id
|
9
|
+
included do |includer|
|
9
10
|
|
10
|
-
|
11
|
+
has_many :grouped_inventory_items, class_name: 'Unidom::Inventory::GroupedInventoryItem', foreign_key: :stored_id
|
12
|
+
has_many :serialized_inventory_items, class_name: 'Unidom::Inventory::SerializedInventoryItem', foreign_key: :stored_id
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
+
end
|
15
|
+
|
16
|
+
module ClassMethods
|
17
|
+
end
|
14
18
|
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
15
23
|
end
|
@@ -1,13 +1,19 @@
|
|
1
1
|
##
|
2
2
|
# Grouped Inventory Item 是分组库存项。
|
3
3
|
|
4
|
-
|
4
|
+
module Unidom
|
5
|
+
module Inventory
|
5
6
|
|
6
|
-
|
7
|
+
class GroupedInventoryItem < ApplicationRecord
|
7
8
|
|
8
|
-
|
9
|
-
include Unidom::Inventory::Concerns::AsInventoryItem
|
9
|
+
self.table_name = 'unidom_grouped_inventory_items'
|
10
10
|
|
11
|
-
|
11
|
+
include Unidom::Common::Concerns::ModelExtension
|
12
|
+
include Unidom::Inventory::Concerns::AsInventoryItem
|
12
13
|
|
13
|
-
|
14
|
+
validates :quantity, presence: true, numericality: { greater_than_or_equal_to: 0.0, less_than_or_equal_to: 1_000_000_000.00 }
|
15
|
+
|
16
|
+
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Inventory::GroupedInventoryItem'
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -4,37 +4,43 @@
|
|
4
4
|
# #reason 是调整的原因。
|
5
5
|
# #quantity 是调整数量,正数表示库存增加,负数表示库存减少。
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
7
|
+
module Unidom
|
8
|
+
module Inventory
|
9
|
+
|
10
|
+
class InventoryItemVariance < ApplicationRecord
|
11
|
+
|
12
|
+
self.table_name = 'unidom_inventory_item_variances'
|
13
|
+
|
14
|
+
include Unidom::Common::Concerns::ModelExtension
|
15
|
+
|
16
|
+
#validates :quantity, presence: true, numericality: true
|
17
|
+
validates :quantity, presence: true, numericality: { greater_than: -1_000_000_000.00, less_than: 1_000_000_000.00 }
|
18
|
+
|
19
|
+
belongs_to :inventory_item, polymorphic: true
|
20
|
+
belongs_to :reason, polymorphic: true
|
21
|
+
|
22
|
+
scope :inventory_item_is, ->(inventory_item) { where inventory_item: inventory_item }
|
23
|
+
scope :caused_by, ->(reason) { where reason: reason }
|
24
|
+
|
25
|
+
##
|
26
|
+
# 对库存项 inventory_item 进行调整。调整数量为 quantity ,缺省为 nil 。调整原因为 due_to 。调整时间为 at ,缺省为当前时间。
|
27
|
+
# 另有适用于己方的备注信息 description 和适用于对方的备注信息 instruction 。
|
28
|
+
# Unidom::Inventory::InventoryItemVariance.adjust! inventory_item, quantity: 3
|
29
|
+
def self.adjust!(inventory_item, quantity: nil, due_to: nil, at: Time.now, description: nil, instruction: nil)
|
30
|
+
if inventory_item.respond_to? :quantity
|
31
|
+
inventory_item.increment! :quantity, quantity
|
32
|
+
else
|
33
|
+
if quantity.nil?
|
34
|
+
quantity = -1
|
35
|
+
inventory_item.soft_destroy
|
36
|
+
else
|
37
|
+
raise ArgumentError.new('The quantity should be -1 when Inventory Item Variance adjusts a Serialized Inventory Item.')
|
38
|
+
end
|
39
|
+
end
|
40
|
+
create! inventory_item: inventory_item, reason: due_to, quantity: quantity, description: description, instruction: instruction, opened_at: at
|
35
41
|
end
|
36
|
-
end
|
37
|
-
create! inventory_item: inventory_item, reason: due_to, quantity: quantity, description: description, instruction: instruction, opened_at: at
|
38
|
-
end
|
39
42
|
|
40
|
-
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Inventory::InventoryItemVariance'
|
43
|
+
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Inventory::InventoryItemVariance'
|
44
|
+
|
45
|
+
end
|
46
|
+
end
|
@@ -4,16 +4,22 @@
|
|
4
4
|
# #inventory_item 是库存项,可以由 #pick_item 导出。
|
5
5
|
# #target_item 是目标项,比如: ShipmentItem 、 OrderItem 等。
|
6
6
|
|
7
|
-
|
7
|
+
module Unidom
|
8
|
+
module Inventory
|
8
9
|
|
9
|
-
|
10
|
+
class ItemIssuing < ApplicationRecord
|
10
11
|
|
11
|
-
|
12
|
+
self.table_name = 'unidom_item_issuings'
|
12
13
|
|
13
|
-
|
14
|
+
include Unidom::Common::Concerns::ModelExtension
|
14
15
|
|
15
|
-
|
16
|
-
belongs_to :inventory_item, polymorphic: true
|
17
|
-
belongs_to :target_item, polymorphic: true
|
16
|
+
validates :quantity, presence: true, numericality: true
|
18
17
|
|
19
|
-
|
18
|
+
belongs_to :pick_item, class_name: 'Unidom::Inventory::PickItem'
|
19
|
+
belongs_to :inventory_item, polymorphic: true
|
20
|
+
belongs_to :target_item, polymorphic: true
|
21
|
+
|
22
|
+
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Inventory::ItemIssuing'
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
@@ -1,16 +1,22 @@
|
|
1
1
|
##
|
2
2
|
# Lot 是批量。
|
3
3
|
|
4
|
-
|
4
|
+
module Unidom
|
5
|
+
module Inventory
|
5
6
|
|
6
|
-
|
7
|
+
class Lot < ApplicationRecord
|
7
8
|
|
8
|
-
|
9
|
+
self.table_name = 'unidom_lots'
|
9
10
|
|
10
|
-
|
11
|
-
validates :identification_number, presence: true, length: { in: 2..columns_hash['identification_number'].limit }
|
11
|
+
include Unidom::Common::Concerns::ModelExtension
|
12
12
|
|
13
|
-
|
14
|
-
|
13
|
+
validates :quantity, presence: true, numericality: true
|
14
|
+
validates :identification_number, presence: true, length: { in: 2..columns_hash['identification_number'].limit }
|
15
15
|
|
16
|
-
|
16
|
+
has_many :grouped_inventory_items, class_name: 'Unidom::Inventory::GroupedInventoryItem'
|
17
|
+
has_many :serialized_inventory_items, class_name: 'Unidom::Inventory::SerializedInventoryItem'
|
18
|
+
|
19
|
+
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Inventory::Lot'
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -1,15 +1,21 @@
|
|
1
1
|
##
|
2
2
|
# Pick Item 是出库单项。
|
3
3
|
|
4
|
-
|
4
|
+
module Unidom
|
5
|
+
module Inventory
|
5
6
|
|
6
|
-
|
7
|
+
class PickItem < ApplicationRecord
|
7
8
|
|
8
|
-
|
9
|
+
self.table_name = 'unidom_pick_items'
|
9
10
|
|
10
|
-
|
11
|
+
include Unidom::Common::Concerns::ModelExtension
|
11
12
|
|
12
|
-
|
13
|
-
belongs_to :inventory_item, polymorphic: true
|
13
|
+
validates :quantity, presence: true, numericality: true
|
14
14
|
|
15
|
-
|
15
|
+
belongs_to :pick_list, class_name: 'Unidom::Inventory::PickList'
|
16
|
+
belongs_to :inventory_item, polymorphic: true
|
17
|
+
|
18
|
+
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Inventory::PickItem'
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
@@ -1,12 +1,18 @@
|
|
1
1
|
##
|
2
2
|
# Pick List 是出库单。
|
3
3
|
|
4
|
-
|
4
|
+
module Unidom
|
5
|
+
module Inventory
|
5
6
|
|
6
|
-
|
7
|
+
class PickList < ApplicationRecord
|
7
8
|
|
8
|
-
|
9
|
+
self.table_name = 'unidom_pick_lists'
|
9
10
|
|
10
|
-
|
11
|
+
include Unidom::Common::Concerns::ModelExtension
|
11
12
|
|
12
|
-
|
13
|
+
has_many :items, class_name: 'Unidom::Inventory::PickItem' #, foreign_key: :pick_list_id
|
14
|
+
|
15
|
+
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Inventory::PickList'
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
@@ -1,13 +1,19 @@
|
|
1
1
|
##
|
2
2
|
# Serialized Inventory Item 是序列化库存项。
|
3
3
|
|
4
|
-
|
4
|
+
module Unidom
|
5
|
+
module Inventory
|
5
6
|
|
6
|
-
|
7
|
+
class SerializedInventoryItem < ApplicationRecord
|
7
8
|
|
8
|
-
|
9
|
-
include Unidom::Inventory::Concerns::AsInventoryItem
|
9
|
+
self.table_name = 'unidom_serialized_inventory_items'
|
10
10
|
|
11
|
-
|
11
|
+
include Unidom::Common::Concerns::ModelExtension
|
12
|
+
include Unidom::Inventory::Concerns::AsInventoryItem
|
12
13
|
|
13
|
-
|
14
|
+
validates :serial_number, presence: true, length: { in: 2..columns_hash['serial_number'].limit }
|
15
|
+
|
16
|
+
end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Inventory::SerializedInventoryItem'
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateUnidomSerializedInventoryItems < ActiveRecord::Migration
|
1
|
+
class CreateUnidomSerializedInventoryItems < ActiveRecord::Migration[6.0]
|
2
2
|
|
3
3
|
def change
|
4
4
|
|
@@ -12,7 +12,7 @@ class CreateUnidomSerializedInventoryItems < ActiveRecord::Migration
|
|
12
12
|
|
13
13
|
t.string :serial_number, null: false, default: nil, limit: 200
|
14
14
|
|
15
|
-
t.column :state, 'char(1)', null: false, default:
|
15
|
+
t.column :state, 'char(1)', null: false, default: Unidom::Common::STATE
|
16
16
|
t.datetime :opened_at, null: false, default: Unidom::Common::OPENED_AT
|
17
17
|
t.datetime :closed_at, null: false, default: Unidom::Common::CLOSED_AT
|
18
18
|
t.boolean :defunct, null: false, default: false
|
@@ -24,7 +24,7 @@ class CreateUnidomSerializedInventoryItems < ActiveRecord::Migration
|
|
24
24
|
|
25
25
|
add_index :unidom_serialized_inventory_items, :stored_id
|
26
26
|
add_index :unidom_serialized_inventory_items, :store_id
|
27
|
-
add_index :unidom_serialized_inventory_items, :lot_id
|
27
|
+
#add_index :unidom_serialized_inventory_items, :lot_id
|
28
28
|
add_index :unidom_serialized_inventory_items, :serial_number
|
29
29
|
|
30
30
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateUnidomGroupedInventoryItems < ActiveRecord::Migration
|
1
|
+
class CreateUnidomGroupedInventoryItems < ActiveRecord::Migration[6.0]
|
2
2
|
|
3
3
|
def change
|
4
4
|
|
@@ -12,7 +12,7 @@ class CreateUnidomGroupedInventoryItems < ActiveRecord::Migration
|
|
12
12
|
|
13
13
|
t.decimal :quantity, null: false, default: 0.0, precision: 12, scale: 2
|
14
14
|
|
15
|
-
t.column :state, 'char(1)', null: false, default:
|
15
|
+
t.column :state, 'char(1)', null: false, default: Unidom::Common::STATE
|
16
16
|
t.datetime :opened_at, null: false, default: Unidom::Common::OPENED_AT
|
17
17
|
t.datetime :closed_at, null: false, default: Unidom::Common::CLOSED_AT
|
18
18
|
t.boolean :defunct, null: false, default: false
|
@@ -24,7 +24,7 @@ class CreateUnidomGroupedInventoryItems < ActiveRecord::Migration
|
|
24
24
|
|
25
25
|
add_index :unidom_grouped_inventory_items, :stored_id
|
26
26
|
add_index :unidom_grouped_inventory_items, :store_id
|
27
|
-
add_index :unidom_grouped_inventory_items, :lot_id
|
27
|
+
#add_index :unidom_grouped_inventory_items, :lot_id
|
28
28
|
|
29
29
|
end
|
30
30
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateUnidomInventoryItemVariances < ActiveRecord::Migration
|
1
|
+
class CreateUnidomInventoryItemVariances < ActiveRecord::Migration[6.0]
|
2
2
|
|
3
3
|
def change
|
4
4
|
|
@@ -14,7 +14,7 @@ class CreateUnidomInventoryItemVariances < ActiveRecord::Migration
|
|
14
14
|
t.text :description
|
15
15
|
t.text :instruction
|
16
16
|
|
17
|
-
t.column :state, 'char(1)', null: false, default:
|
17
|
+
t.column :state, 'char(1)', null: false, default: Unidom::Common::STATE
|
18
18
|
t.datetime :opened_at, null: false, default: Unidom::Common::OPENED_AT
|
19
19
|
t.datetime :closed_at, null: false, default: Unidom::Common::CLOSED_AT
|
20
20
|
t.boolean :defunct, null: false, default: false
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateUnidomLots < ActiveRecord::Migration
|
1
|
+
class CreateUnidomLots < ActiveRecord::Migration[6.0]
|
2
2
|
|
3
3
|
def change
|
4
4
|
|
@@ -10,7 +10,7 @@ class CreateUnidomLots < ActiveRecord::Migration
|
|
10
10
|
t.text :description
|
11
11
|
t.text :instruction
|
12
12
|
|
13
|
-
t.column :state, 'char(1)', null: false, default:
|
13
|
+
t.column :state, 'char(1)', null: false, default: Unidom::Common::STATE
|
14
14
|
t.datetime :opened_at, null: false, default: Unidom::Common::OPENED_AT
|
15
15
|
t.datetime :closed_at, null: false, default: Unidom::Common::CLOSED_AT
|
16
16
|
t.boolean :defunct, null: false, default: false
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateUnidomPickLists < ActiveRecord::Migration
|
1
|
+
class CreateUnidomPickLists < ActiveRecord::Migration[6.0]
|
2
2
|
|
3
3
|
def change
|
4
4
|
|
@@ -7,7 +7,7 @@ class CreateUnidomPickLists < ActiveRecord::Migration
|
|
7
7
|
t.text :description
|
8
8
|
t.text :instruction
|
9
9
|
|
10
|
-
t.column :state, 'char(1)', null: false, default:
|
10
|
+
t.column :state, 'char(1)', null: false, default: Unidom::Common::STATE
|
11
11
|
t.datetime :opened_at, null: false, default: Unidom::Common::OPENED_AT
|
12
12
|
t.datetime :closed_at, null: false, default: Unidom::Common::CLOSED_AT
|
13
13
|
t.boolean :defunct, null: false, default: false
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateUnidomPickItems < ActiveRecord::Migration
|
1
|
+
class CreateUnidomPickItems < ActiveRecord::Migration[6.0]
|
2
2
|
|
3
3
|
def change
|
4
4
|
|
@@ -13,7 +13,7 @@ class CreateUnidomPickItems < ActiveRecord::Migration
|
|
13
13
|
t.text :description
|
14
14
|
t.text :instruction
|
15
15
|
|
16
|
-
t.column :state, 'char(1)', null: false, default:
|
16
|
+
t.column :state, 'char(1)', null: false, default: Unidom::Common::STATE
|
17
17
|
t.datetime :opened_at, null: false, default: Unidom::Common::OPENED_AT
|
18
18
|
t.datetime :closed_at, null: false, default: Unidom::Common::CLOSED_AT
|
19
19
|
t.boolean :defunct, null: false, default: false
|
@@ -23,7 +23,7 @@ class CreateUnidomPickItems < ActiveRecord::Migration
|
|
23
23
|
|
24
24
|
end
|
25
25
|
|
26
|
-
add_index :unidom_pick_items, :pick_list_id
|
26
|
+
#add_index :unidom_pick_items, :pick_list_id
|
27
27
|
add_index :unidom_pick_items, :inventory_item_id
|
28
28
|
|
29
29
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class CreateUnidomItemIssuings < ActiveRecord::Migration
|
1
|
+
class CreateUnidomItemIssuings < ActiveRecord::Migration[6.0]
|
2
2
|
|
3
3
|
def change
|
4
4
|
|
@@ -15,7 +15,7 @@ class CreateUnidomItemIssuings < ActiveRecord::Migration
|
|
15
15
|
t.text :description
|
16
16
|
t.text :instruction
|
17
17
|
|
18
|
-
t.column :state, 'char(1)', null: false, default:
|
18
|
+
t.column :state, 'char(1)', null: false, default: Unidom::Common::STATE
|
19
19
|
t.datetime :opened_at, null: false, default: Unidom::Common::OPENED_AT
|
20
20
|
t.datetime :closed_at, null: false, default: Unidom::Common::CLOSED_AT
|
21
21
|
t.boolean :defunct, null: false, default: false
|
@@ -25,7 +25,7 @@ class CreateUnidomItemIssuings < ActiveRecord::Migration
|
|
25
25
|
|
26
26
|
end
|
27
27
|
|
28
|
-
add_index :unidom_item_issuings, :pick_item_id
|
28
|
+
#add_index :unidom_item_issuings, :pick_item_id
|
29
29
|
add_index :unidom_item_issuings, :inventory_item_id
|
30
30
|
add_index :unidom_item_issuings, :target_item_id
|
31
31
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unidom-inventory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unidom-common
|
@@ -81,11 +81,11 @@ files:
|
|
81
81
|
- lib/unidom/inventory/types_rspec.rb
|
82
82
|
- lib/unidom/inventory/validators_rspec.rb
|
83
83
|
- lib/unidom/inventory/version.rb
|
84
|
-
homepage: https://
|
84
|
+
homepage: https://gitee.com/Unidom/unidom-inventory
|
85
85
|
licenses:
|
86
86
|
- MIT
|
87
87
|
metadata: {}
|
88
|
-
post_install_message:
|
88
|
+
post_install_message:
|
89
89
|
rdoc_options: []
|
90
90
|
require_paths:
|
91
91
|
- lib
|
@@ -100,8 +100,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
|
-
rubygems_version: 3.
|
104
|
-
signing_key:
|
103
|
+
rubygems_version: 3.2.3
|
104
|
+
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Unidom Inventory Domain Model Engine 库存领域模型引擎
|
107
107
|
test_files: []
|