refactors data access layer to use pop ORM for eager loading, adds book titles rented to renters in response body
This commit is contained in:
@@ -2,9 +2,10 @@ package bookish_server
|
||||
|
||||
// Renter is an entity in the Bookish API wish rents books.
|
||||
type Renter struct {
|
||||
ID int `db:"id" json:"id"`
|
||||
Name string `db:"name" json:"name"`
|
||||
Address string `db:"address" json:"address"`
|
||||
Email string `db:"email" json:"email"`
|
||||
PhoneNumber string `db:"phone_number" json:"phoneNumber"`
|
||||
ID string `db:"id" json:"id"`
|
||||
Name string `db:"name" json:"name"`
|
||||
Address string `db:"address" json:"address"`
|
||||
Email string `db:"email" json:"email"`
|
||||
PhoneNumber string `db:"phone_number" json:"phoneNumber"`
|
||||
Rentals []string `json:"rentals"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user