25 lines
488 B
Go
25 lines
488 B
Go
package budgeteer
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Budget represents a budget
|
|
type Budget struct {
|
|
ID string
|
|
Name string
|
|
LastModification time.Time
|
|
}
|
|
|
|
// UserBudget represents the relation between users and budgets
|
|
type UserBudget struct {
|
|
UserID string `sql:",pk"`
|
|
BudgetID string `sql:",pk"`
|
|
}
|
|
|
|
// BudgetService provides Methods for CRUD of Budgets
|
|
type BudgetService interface {
|
|
Budget(id string) (Budget, error)
|
|
BudgetsForUser(id string) ([]Budget, error)
|
|
}
|