Commit 0891caff by liyijie

feat: 增加export_header 的 attr_json模型

parent 8e02e560
...@@ -16,6 +16,7 @@ module TalltyImportExport ...@@ -16,6 +16,7 @@ module TalltyImportExport
autoload :Context autoload :Context
autoload :FormConvert autoload :FormConvert
autoload :Excel autoload :Excel
autoload :Attr
class Error < StandardError; end class Error < StandardError; end
......
require 'tallty_import_export/attr/export_header'
module TalltyImportExport
module Attr
class ExportHeader
include AttrJson::Model
attr_json_config(bad_cast: :as_nil, unknown_key: :allow)
attr_json :key, :string
attr_json :name, :string
attr_json :attr_type, :string
attr_json :format, :string
attr_json :method, :string
attr_json :chain, :string, array: true
attr_json :merge, :boolean
attr_json :json, :string
attr_json :select, ActiveModel::Type::Value.new, array: true
attr_json :source, :boolean
attr_json :proc, ActiveModel::Type::Value.new, array: true
attr_json :list, self.to_type, array: true
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment