-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement sqlc #35
Conversation
05d7bc0
to
c5d1310
Compare
internal/entities/role.go
Outdated
UpdatedAt time.Time | ||
Name string | ||
CanEditTrees bool | ||
CanViewTrees bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can already add some here for route planning?
internal/entities/user.go
Outdated
EmployeeID string | ||
PhoneNumber string | ||
Email string | ||
ProfileImage *Image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Avatar
? It's a little shorter
internal/entities/tree.go
Outdated
Species string | ||
SoilCondition TreeSoilCondition | ||
TreeNumber int32 | ||
AdditionalInfo string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the AdditionalInfo field?
internal/entities/tree.go
Outdated
HeightAboveSeaLevel float64 | ||
PlantingYear int32 | ||
Species string | ||
SoilCondition TreeSoilCondition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SoilCondition
maybe to TreeCluster?
internal/entities/wateringplan.go
Outdated
CreatedAt time.Time | ||
UpdatedAt time.Time | ||
Status RouteStatus | ||
Automatic bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The automatic
should be a value in the WateringPlan struct and maybe we can call it something like is_created_automatically
internal/entities/plantingarea.go
Outdated
"time" | ||
) | ||
|
||
type PlantingArea struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the name Flowerbed
?
internal/entities/plantingarea.go
Outdated
Description string | ||
NumberOfPlants int32 | ||
CurrentMoistureLevel float64 | ||
AdditionalInfo string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make it shorter: MoistureLevel - and AdditionalInfo is also maybe not needed here
internal/entities/sensor.go
Outdated
ID int32 | ||
CreatedAt time.Time | ||
UpdatedAt time.Time | ||
FirstUsed time.Time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For which case do we need this value?
Sensor *Sensor | ||
Images []*Image | ||
Age int32 | ||
HeightAboveSeaLevel float64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just Height
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but then it can also mean the height of the tree?
internal/entities/tree.go
Outdated
PlantingYear int32 | ||
Species string | ||
SoilCondition TreeSoilCondition | ||
TreeNumber int32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just Number
internal/entities/treecluster.go
Outdated
UpdatedAt time.Time | ||
WateringStatus TreeClusterWateringStatus | ||
LastWatered time.Time | ||
CurrentMoistureLevel float64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MoistureLevel
maybe?
internal/entities/vehicle.go
Outdated
UpdatedAt time.Time | ||
NumberPlate string | ||
Description string | ||
Routes []*Route |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WaterCapacity
is missing
internal/entities/wateringplan.go
Outdated
Description string | ||
StartDate time.Time | ||
EndDate time.Time | ||
RouteLengthKm float64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just Length
?
internal/entities/wateringplan.go
Outdated
UpdatedAt time.Time | ||
Name string | ||
Description string | ||
StartDate time.Time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be saved in the route, right?
internal/entities/wateringplan.go
Outdated
RouteLengthKm float64 | ||
WaterRequiredLitres float64 | ||
WaterConsumedLitres float64 | ||
Routes []*Route |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is missing the starting point of the watering plan, because there are only two options possible in Flensburg.
58f3d12
to
b1574f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
feat: implement person repository feat: implement mapper fix: build issue with mapper feat: add roles feat: add seed.sql feat: add makefile feat: finished init migration and change docker postgres to postgis feat: create repo interfaces (wip) feat: implement domain entites (wip) fix: fix info repo chore: change person to user feat: finished user repo feat: create postgres repo feat: implement role repo feat: implement image repo feat: start with routes queries feat: update domain entities feat: create migration for version 1 chore: backup full db init migration feat: change seed chore: rename sensor measurements to sensor data feat: write sql queries feat: change migration feat: remove not used repos feat: update domain entities fix: change issues in migration fix: fix issues in queries feat: implement tree repo feat: implement treecluster repo WIP: restructure project fix: remove old sevice logic feat: implement sensor repo feat: implement vehicle repo and run go fmt feat: implement flowerbed repo fix: fix rebase feat: add demo data in seed chore: run go fmt chore: fix linter annotations fix: update build and test pipeline chore: update linter version in pipeline chore: fix linter annotations and disable shadow and commented out code hints chore: fix more linter annotations feat: update Makefile chore: refactoring repositories feat: put all repos together chore: remove left over mongodb error definitions
98ef048
to
980eaad
Compare
Close #21
Note
The hole business logic has been removed. The API handlers and routes are still active and the repositories are implemented, but the business logic is missing.