emoss08 / Trenova

An Open Source AI-driven asset based transportation management system
http://trenova.app
Other
24 stars 5 forks source link

✨(feat): location module #269

Closed emoss08 closed 2 months ago

emoss08 commented 2 months ago

Summary by Sourcery

This pull request introduces a new location module with support for comments and contacts, including database schema changes, model updates, and service enhancements. It also improves error handling and validation across various components.

sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request introduces a new location module with significant enhancements to the Location model, including the addition of Comments and Contacts fields. It also includes corresponding migration scripts, updates to service and handler logic, and new utility functions for handling nested validation errors. Additionally, it fixes minor issues and adds unit tests for the AccessorialCharge model.

File-Level Changes

Files Changes
pkg/models/location.go
pkg/models/location_comment.go
pkg/models/location_contact.go
Enhanced Location model to include Comments and Contacts, with corresponding validation and synchronization logic.
migrate/migrations/20240701035001_location.tx.up.sql
migrate/migrations/20240701035001_location.tx.down.sql
Added migration scripts for creating and dropping location_comments and location_contacts tables.
internal/api/services/location.service.go
internal/api/handlers/location.handler.go
Updated service and handler logic to handle new Comments and Contacts fields in Location model.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.