Chapter 2 Assignment

Model a small invoice domain

The brief

Add three models: Customer (has many Invoices), Invoice (belongs to Customer, has many LineItems), LineItem (belongs to Invoice). Run `grit migrate` and confirm the foreign keys exist via GORM Studio.

You've completed this when

  • Three models exist with the relations wired
  • AutoMigrate created the tables + FK columns
  • GORM Studio shows the relationships

Worked through every criterion?

Push your code to GitHub, paste the link in your notes.md, and move on.

Continue to ch.3: Auth & RBAC