feat: add isLMSAvailable field to device model#905
Draft
sinchubhat wants to merge 1 commit intomainfrom
Draft
Conversation
4 tasks
4 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #905 +/- ##
==========================================
+ Coverage 40.62% 40.66% +0.03%
==========================================
Files 116 116
Lines 10889 10895 +6
==========================================
+ Hits 4424 4430 +6
Misses 6072 6072
Partials 393 393 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* Add database migration to store islmsavailable boolean on devices table * Update device entity, DTO, and CRUD queries to handle the new field Resolves #1246 of RPC-Go
There was a problem hiding this comment.
Pull request overview
Adds an isLMSAvailable boolean attribute to the Device model and persists it in the database, wiring it through DTO/entity conversions and SQL CRUD.
Changes:
- Add DB migration to create/drop
devices.islmsavailablewith a default ofFALSE. - Extend device entity + v1 DTO + usecase transforms to include
IsLMSAvailable. - Update SQL repo Select/Scan/Insert/Update paths (and test DB schemas) to handle the new column.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/usecase/sqldb/device.go | Adds islmsavailable to device Select/Scan and Insert/Update statements. |
| internal/usecase/sqldb/device_test.go | Updates SQLite test schemas to include the new column. |
| internal/usecase/devices/usecase.go | Maps IsLMSAvailable between DTO and entity in both directions. |
| internal/entity/dto/v1/device.go | Adds isLMSAvailable to the v1 Device JSON model. |
| internal/entity/device.go | Adds IsLMSAvailable to the core Device entity. |
| internal/app/migrations/20260424000000_add_lms_available.up.sql | Adds islmsavailable column to devices. |
| internal/app/migrations/20260424000000_add_lms_available.down.sql | Drops islmsavailable column from devices. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0b82b37 to
b412772
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1246 of RPC-Go