package main import "time" type User struct { ID int `json:"id"` Name string `json:"name"` } type UserWithAllowance struct { ID int `json:"id"` Name string `json:"name"` Allowance int `json:"allowance"` } type History struct { Allowance int `json:"allowance"` Timestamp time.Time `json:"timestamp"` } type PostHistory struct { Allowance int `json:"allowance"` } // Task represents a task in the system. type Task struct { ID int `json:"id"` Name string `json:"name"` Reward int `json:"reward"` Assigned *int `json:"assigned"` // Pointer to allow null } type Allowance struct { ID int `json:"id"` Name string `json:"name"` Target int `json:"target"` Progress int `json:"progress"` Weight int `json:"weight"` } type CreateAllowanceRequest struct { Name string `json:"name"` Target int `json:"target"` Weight int `json:"weight"` } type CreateGoalResponse struct { ID int `json:"id"` } type CreateTaskRequest struct { Name string `json:"name" binding:"required"` Reward int `json:"reward"` Assigned *int `json:"assigned"` } type CreateTaskResponse struct { ID int `json:"id"` }