2019-03-07 16:05:35 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-01-23 21:54:15 +08:00
|
|
|
FactoryBot.define do
|
2017-07-28 16:14:50 +08:00
|
|
|
factory :repository_column do
|
2019-03-07 16:05:35 +08:00
|
|
|
sequence(:name) { |n| "My column-#{n}" }
|
|
|
|
created_by { create :user }
|
2022-06-07 00:21:57 +08:00
|
|
|
repository { association :repository, created_by: created_by }
|
2019-06-13 18:10:44 +08:00
|
|
|
data_type { :RepositoryTextValue }
|
2019-05-07 19:47:50 +08:00
|
|
|
|
|
|
|
trait :text_type do
|
2019-06-13 18:10:44 +08:00
|
|
|
data_type { :RepositoryTextValue }
|
2019-05-07 19:47:50 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :list_type do
|
2019-06-13 18:10:44 +08:00
|
|
|
data_type { :RepositoryListValue }
|
2019-05-07 19:47:50 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
trait :asset_type do
|
2019-06-13 18:10:44 +08:00
|
|
|
data_type { :RepositoryAssetValue }
|
2019-05-07 19:47:50 +08:00
|
|
|
end
|
2019-10-08 19:38:57 +08:00
|
|
|
|
|
|
|
trait :status_type do
|
|
|
|
data_type { :RepositoryStatusValue }
|
|
|
|
end
|
2019-11-18 22:21:57 +08:00
|
|
|
|
|
|
|
trait :date_time_type do
|
|
|
|
data_type { :RepositoryDateTimeValue }
|
2019-11-21 23:22:15 +08:00
|
|
|
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 }
|
2019-11-18 22:21:57 +08:00
|
|
|
end
|
2019-12-06 20:18:35 +08:00
|
|
|
|
2019-12-09 20:38:40 +08:00
|
|
|
trait :checklist_type do
|
|
|
|
data_type { :RepositoryChecklistValue }
|
2019-12-06 20:18:35 +08:00
|
|
|
end
|
2022-03-30 20:33:26 +08:00
|
|
|
|
|
|
|
trait :stock_type do
|
|
|
|
data_type { :RepositoryStockValue }
|
|
|
|
end
|
2017-07-28 16:14:50 +08:00
|
|
|
end
|
|
|
|
end
|