Module: Mapping
- Included in:
- App
- Defined in:
- lib/dandy/generators/templates/db/mapping.rb
Overview
Don’t forget add dependencies require ‘./domain/user’ require ‘./domain/invoice’
Instance Method Summary collapse
Instance Method Details
#load_mapping ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/dandy/generators/templates/db/mapping.rb', line 6 def load_mapping JetSet::map do # Example: # # entity User do # field :first_name # field :last_name # field :company # collection :invoices, type: Invoice # end # # entity Invoice do # field :amount # field :date # field :created_at # reference :user, type: User # end end end |