guesstimate/server/internal/model/project.go

36 lines
1.1 KiB
Go

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"`
Ordering []TaskID `json:"ordering"`
Params Params `json:"params"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type Params struct {
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"`
}