add favorite system and other small tweaks and fixes.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -15,6 +15,7 @@ type Project struct {
|
||||
CreatedTime time.Time `json:"createdTime" db:"created_time"`
|
||||
EndTime *time.Time `json:"endTime" db:"end_time"`
|
||||
StatusTag *string `json:"statusTag" db:"status_tag"`
|
||||
Favorite bool `json:"favorite" db:"favorite"`
|
||||
}
|
||||
|
||||
func (project *Project) Update(update ProjectUpdate) {
|
||||
@@ -43,6 +44,9 @@ func (project *Project) Update(update ProjectUpdate) {
|
||||
if update.ClearStatusTag {
|
||||
project.StatusTag = nil
|
||||
}
|
||||
if update.Favorite != nil {
|
||||
project.Favorite = *update.Favorite
|
||||
}
|
||||
}
|
||||
|
||||
type ProjectUpdate struct {
|
||||
@@ -54,6 +58,7 @@ type ProjectUpdate struct {
|
||||
ClearEndTime bool `json:"clearEndTime"`
|
||||
StatusTag *string `json:"statusTag"`
|
||||
ClearStatusTag bool `json:"clearStatusTag"`
|
||||
Favorite *bool `json:"favorite"`
|
||||
}
|
||||
|
||||
type ProjectResult struct {
|
||||
@@ -64,6 +69,7 @@ type ProjectResult struct {
|
||||
type ProjectFilter struct {
|
||||
UserID string
|
||||
Active *bool
|
||||
Favorite *bool
|
||||
Expiring bool
|
||||
IDs []string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user