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.

19 lines
585 B

package tag
import "git.aiterp.net/rpdata2-take2/rpdata2/internal/genutils"
type Update struct {
ParentID *string `json:"parentId"`
Name *string `json:"name"`
Kind *Kind `json:"kind"`
Listed *bool `json:"listed"`
Secret *bool `json:"secret"` // Only owners can see it
}
func (t *Tag) ApplyUpdate(update *Update) {
genutils.ApplyUpdateNilZero(&t.ParentID, update.ParentID)
genutils.ApplyUpdate(&t.Name, update.Name)
genutils.ApplyUpdate(&t.Kind, update.Kind)
genutils.ApplyUpdate(&t.Listed, update.Listed)
genutils.ApplyUpdate(&t.Secret, update.Secret)
}