module <%= @module %>
  class <%= class_name %> < <%= @db_record %>

    self.table_name = '<%= table_name %>'

  <%- @fields.each do |fi| -%>
    alias_attribute :<%= fi.underscore.gsub(/(?=\d)/, "_") %>, :<%= fi %>
  <%- end -%>

  <%- unless db_name == 'BrittonWeb' -%>
    def attributes
      rails_like = {
        <%- @fields.each do |fi| -%>
          <%= fi.underscore.gsub(/(?=\d)/, "_") %>: self.<%= fi.underscore.gsub(/(?=\d)/, "_") %>,
        <%- end -%>
      }
      super.merge(rails_like)
    end
  <%- end -%>


  end
end