Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions api/schema/objects.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package schema

import (
"encoding/json"
"strings"
"time"

Expand Down Expand Up @@ -402,6 +403,60 @@ type APIResponse[T any] struct {
Data T `json:"data"`
}

// Program Schema
type Program struct {
SourceId int `json:"programId"`
Current ProgramCurrent `json:"current"`
NextCost *Cost `json:"nextAppCycleCostSheet"`
}

type ProgramCurrent struct {
Sections []ProgramSection `json:"sections"`
}

type ProgramSection struct {
DisplayName string `json:"sectionDisplayName"`
Widgets []ProgramWidget `json:"sectionWidgets"`
}

type ProgramWidget struct {
ContentType string `json:"contentType"` // content, media, information sheet, cost sheet, action buttons, dates / deadlines
Information json.RawMessage `json:"contentInformationSheet"`
}

type InformationSheet struct {
Parameters []Parameter `json:"parameters"`
}

type Parameter struct {
Name string `json:"parameterName"`
AssignedValues []string `json:"assignedValues"`
Type string `json:"parameterType"` // SELCT, MULTI, MINIM
}

// Cost Structs
type Cost struct {
SourceId int `json:"costSheetId"`
Term string `json:"term"`
Year int `json:"year"`
Billable []CostItem `json:"billableCostSheetItems"`
NonBillable []CostItem `json:"nonBillableCostSheetItems"`
Credits []CostItem `json:"creditCostSheetItems"`
}

type CostItem struct {
Name string `json:"costSheetItemName"`
Category string `json:"costSheetItemCategory"` // Billable, Non-Billable, Cost Reduction
Type string `json:"costSheetItemType"` // Fixed, Optional, Manual Entry, Selection List
Costs []CostDetail `json:"costs"`
}

type CostDetail struct {
Key string `json:"costKey"` // e.g. "In-State", "Out-of-State", empty for fixed
Value float64 `json:"costValue"`
Currency string `json:"costCurrency"`
}

/* Can uncomment these if we ever get evals

// 5 Level Likert Item scale for evaluation responses
Expand Down
Loading