mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-13 20:56:52 +08:00
229a27750f
* Implement stock consumption via the API [SCI-6642] * Remove unnecessary attribute from InventoryItemSerializer [SCI-6642] * Amend permission check, add nested transaction support to consume_stock method [SCI-6642]
58 lines
1.2 KiB
Ruby
58 lines
1.2 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
FactoryBot.define do
|
|
factory :repository_column do
|
|
sequence(:name) { |n| "My column-#{n}" }
|
|
created_by { create :user }
|
|
repository
|
|
data_type { :RepositoryTextValue }
|
|
|
|
trait :text_type do
|
|
data_type { :RepositoryTextValue }
|
|
end
|
|
|
|
trait :list_type do
|
|
data_type { :RepositoryListValue }
|
|
end
|
|
|
|
trait :asset_type do
|
|
data_type { :RepositoryAssetValue }
|
|
end
|
|
|
|
trait :status_type do
|
|
data_type { :RepositoryStatusValue }
|
|
end
|
|
|
|
trait :date_time_type do
|
|
data_type { :RepositoryDateTimeValue }
|
|
end
|
|
|
|
trait :date_type do
|
|
data_type { :RepositoryDateValue }
|
|
end
|
|
|
|
trait :time_type do
|
|
data_type { :RepositoryTimeValue }
|
|
end
|
|
|
|
trait :date_time_range_type do
|
|
data_type { :RepositoryDateTimeRangeValue }
|
|
end
|
|
|
|
trait :date_range_type do
|
|
data_type { :RepositoryDateRangeValue }
|
|
end
|
|
|
|
trait :time_range_type do
|
|
data_type { :RepositoryTimeRangeValue }
|
|
end
|
|
|
|
trait :checklist_type do
|
|
data_type { :RepositoryChecklistValue }
|
|
end
|
|
|
|
trait :stock_type do
|
|
data_type { :RepositoryStockValue }
|
|
end
|
|
end
|
|
end
|