Basic storage backend with diff/patch synchronization

This commit is contained in:
2020-05-03 18:34:44 +02:00
parent 1ac485abf3
commit a9c24051b0
20 changed files with 734 additions and 398 deletions

View File

@ -0,0 +1,29 @@
package model
type ProjectID string
type ProjectEntry struct {
ID ProjectID `storm:"id"`
Version uint64 `storm:"index"`
Project *Project
}
type Project struct {
ID ProjectID `json:"id" storm:"id"`
Label string `json:"label"`
Description string `json:"description"`
Tasks map[TaskID]Task `json:"tasks"`
Params Params `json:"params"`
}
type Params struct {
TaskCategories map[TaskCategoryID]TaskCategory `json:"taskCategories"`
TimeUnit TimeUnit `json:"timeUnit"`
Currency string `json:"currency"`
RoundUpEstimations bool `json:"roundUpEstimations"`
}
type TimeUnit struct {
Acronym string `json:"acronym"`
Label string `json:"label"`
}

View File

@ -0,0 +1,24 @@
package model
type TaskID string
type Task struct {
ID TaskID `json:"id"`
Label string `json:"label"`
Estimations TaskEstimations `json:"estimations"`
CategoryID TaskCategoryID `json:"category"`
}
type TaskEstimations struct {
Optimistic float64 `json:"optimistic"`
Likely float64 `json:"likely"`
Pessimistic float64 `json:"pessimistic"`
}
type TaskCategoryID string
type TaskCategory struct {
ID TaskCategoryID `json:"id"`
Label string `json:"label"`
CostPerTimeUnit float64 `json:"costPerTimeUnit"`
}