new endpoints

This commit is contained in:
samantha42
2026-03-21 16:49:01 +01:00
parent 3490dd13d4
commit c55e7d6774
5 changed files with 213 additions and 68 deletions

View File

@@ -25,6 +25,37 @@ type Department struct {
Code string `json:"code"`
Name string `json:"name"`
CostCenter string `json:"cost_center"`
Active bool `json:"active"`
CreatedAt string `json:"created_at"`
}
type CreateDepartmentRequest struct {
Code string `json:"code"`
Name string `json:"name"`
CostCenter string `json:"cost_center"`
Active bool `json:"active"`
}
type GetDepartmentRequest struct {
Code *string `json:"code"`
Name *string `json:"name"`
CostCenter *string `json:"cost_center"`
}
type SetDepartmentActivity struct {
Active bool `json:"active"`
Code *string `json:"code"`
Name *string `json:"name"`
CostCenter *string `json:"cost_center"`
}
type GLAccount struct {
ID int `json:"id"`
Code string `json:"code"`
Description string `json:"description"`
Type string `json:"type"` // revenue | cogs | opex | capex | headcount
FavourHigh bool `json:"favour_high"` // true = over-budget is good (revenue accounts)
Active bool `json:"active"`
}
type GetDepartmentBudget struct {
@@ -35,14 +66,6 @@ type GetDepartmentActual struct {
Code string `json:"code"`
}
type GLAccount struct {
ID int `json:"id"`
Code string `json:"code"`
Description string `json:"description"`
Type GLAccountType `json:"type"`
FavourHigh bool `json:"favour_high"`
}
type GetGLAccountBudget struct {
Code string `json:"code"`
}