Basic storage backend with diff/patch synchronization
This commit is contained in:
29
server/internal/model/project.go
Normal file
29
server/internal/model/project.go
Normal 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"`
|
||||
}
|
24
server/internal/model/task.go
Normal file
24
server/internal/model/task.go
Normal 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"`
|
||||
}
|
Reference in New Issue
Block a user