Sha256: e8dc1ee0a5d593299edb6b1d4b632c6a80ecade3ec3d789b808590aa23c49453
Contents?: true
Size: 571 Bytes
Versions: 4
Compression:
Stored size: 571 Bytes
Contents
# frozen_string_literal: true class Core::Entities::<%= @subject_class %> < Dry::Struct <% (['id'] + @fields + @uploaders + ['created_at', 'updated_at']).each do |field| -%> <% column_type = get_column_type(field) -%> <% dry_type = @entity_type_mapping[column_type.to_s] || 'Types::Strict::String' -%> <% if @uploaders.include?(field) -%> <% if is_singular?(field) -%> attribute :<%= field %>, Types::Strict::String <% else -%> attribute :<%= field %>, Types::Strict::Array <% end -%> <% else -%> attribute :<%= field %>, <%= dry_type %> <% end -%> <% end -%> end
Version data entries
4 entries across 4 versions & 1 rubygems