Skip to content

Commit

Permalink
feat: join location_images
Browse files Browse the repository at this point in the history
  • Loading branch information
ayaanqui committed Apr 28, 2024
1 parent adf2d84 commit a76f053
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions services/event_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func (service Service) FindAllEvents(ctx context.Context, filter gmodel.AllEvent
table.Location.AllColumns,
table.Address.AllColumns,
table.Country.Name,
table.LocationImage.AllColumns,
created_by_user_table.ID,
created_by_user_table.Name,
created_by_user_table.Avatar,
Expand All @@ -90,6 +91,7 @@ func (service Service) FindAllEvents(ctx context.Context, filter gmodel.AllEvent
INNER_JOIN(table.Location, table.Location.ID.EQ(table.Event.LocationID)).
INNER_JOIN(table.Address, table.Address.ID.EQ(table.Location.AddressID)).
INNER_JOIN(table.Country, table.Country.Code.EQ(table.Address.CountryCode)).
LEFT_JOIN(table.LocationImage, table.LocationImage.LocationID.EQ(table.Location.ID)).
LEFT_JOIN(created_by_user_table, created_by_user_table.ID.EQ(table.Event.CreatedByID)).
LEFT_JOIN(updated_by_user_table, updated_by_user_table.ID.EQ(table.Event.CreatedByID)),
).
Expand Down

0 comments on commit a76f053

Please sign in to comment.