Plantings backend: plop CRUD, derived counts, removed_at (#14)
Build image / build-and-push (push) Successful in 7s
Build image / build-and-push (push) Successful in 7s
Co-authored-by: Steve Dudenhoeffer <[email protected]>
This commit was merged in pull request #33.
This commit is contained in:
@@ -186,4 +186,10 @@ type Planting struct {
|
||||
Version int64 `json:"version"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt"`
|
||||
|
||||
// DerivedCount is the plant count implied by the plop's area and the plant's
|
||||
// mature spacing: max(1, round(π·r² / spacing²)). It is computed by the
|
||||
// service, never persisted (the store scan leaves it 0). The effective count
|
||||
// a client shows is Count when non-nil, else DerivedCount.
|
||||
DerivedCount int `json:"derivedCount"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user