You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.0 KiB
30 lines
1.0 KiB
package models
|
|
|
|
import "context"
|
|
|
|
type ProjectGroup struct {
|
|
ID string `json:"id" db:"id"`
|
|
UserID string `json:"-" db:"user_id"`
|
|
Name string `json:"name" db:"name"`
|
|
Abbreviation string `json:"abbreviation" db:"abbreviation"`
|
|
CategoryNames map[string]string `json:"categoryNames" db:"category_names"`
|
|
}
|
|
|
|
type ProjectGroupUpdate struct {
|
|
Name *string `json:"name"`
|
|
Abbreviation *string `json:"abbreviation"`
|
|
SetCategoryNames map[string]string `json:"setCategoryNames"`
|
|
ResetCategoryName *string `json:"resetCategoryName"`
|
|
}
|
|
|
|
type ProjectGroupFilter struct {
|
|
UserID string `json:"userId"`
|
|
}
|
|
|
|
type ProjectGroupRepository interface {
|
|
Find(ctx context.Context, id string) (*ProjectGroup, error)
|
|
List(ctx context.Context, filter ProjectGroupFilter) ([]*ProjectGroup, error)
|
|
Insert(ctx context.Context, group ProjectGroup) error
|
|
Update(ctx context.Context, group ProjectGroup) error
|
|
Delete(ctx context.Context, group ProjectGroup) error
|
|
}
|