add multiple statuses to proejcts, though it's a bit hacked on.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
+15
-6
@@ -14,6 +14,7 @@ type Project struct {
|
||||
Active bool `json:"active" db:"active"`
|
||||
CreatedTime time.Time `json:"createdTime" db:"created_time"`
|
||||
EndTime *time.Time `json:"endTime" db:"end_time"`
|
||||
StatusTag *string `json:"statusTag" db:"status_tag"`
|
||||
}
|
||||
|
||||
func (project *Project) Update(update ProjectUpdate) {
|
||||
@@ -36,15 +37,23 @@ func (project *Project) Update(update ProjectUpdate) {
|
||||
if update.ClearEndTime {
|
||||
project.EndTime = nil
|
||||
}
|
||||
if update.StatusTag != nil {
|
||||
project.StatusTag = update.StatusTag
|
||||
}
|
||||
if update.ClearStatusTag {
|
||||
project.StatusTag = nil
|
||||
}
|
||||
}
|
||||
|
||||
type ProjectUpdate struct {
|
||||
Name *string `json:"name"`
|
||||
Description *string `json:"description"`
|
||||
Icon *string `json:"icon"`
|
||||
Active *bool `json:"active"`
|
||||
EndTime *time.Time `json:"endTime"`
|
||||
ClearEndTime bool `json:"clearEndTime"`
|
||||
Name *string `json:"name"`
|
||||
Description *string `json:"description"`
|
||||
Icon *string `json:"icon"`
|
||||
Active *bool `json:"active"`
|
||||
EndTime *time.Time `json:"endTime"`
|
||||
ClearEndTime bool `json:"clearEndTime"`
|
||||
StatusTag *string `json:"statusTag"`
|
||||
ClearStatusTag bool `json:"clearStatusTag"`
|
||||
}
|
||||
|
||||
type ProjectResult struct {
|
||||
|
||||
Reference in New Issue
Block a user