guesstimate/server/internal/model/project.go

35 lines
1.0 KiB
Go
Raw Normal View History

package model
import "time"
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"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type Params struct {
2020-07-06 17:50:32 +02:00
TaskCategories map[TaskCategoryID]TaskCategory `json:"taskCategories"`
TimeUnit TimeUnit `json:"timeUnit"`
Currency string `json:"currency"`
RoundUpEstimations bool `json:"roundUpEstimations"`
HideFinancialPreviewOnPrint bool `json:"hideFinancialPreviewOnPrint"`
}
type TimeUnit struct {
Acronym string `json:"acronym"`
Label string `json:"label"`
}