custom-field.go 489 B

12345678910111213141516171819202122232425
  1. package events
  2. import (
  3. "fmt"
  4. )
  5. type Value struct {
  6. CustomFieldValue *CustomFieldValue `json:"custom_field_value,omitempty"`
  7. }
  8. type CustomFieldValue struct {
  9. EnumId int `json:"enum_id,omitempty"`
  10. FieldId int `json:"field_id"`
  11. FieldType int `json:"field_type"`
  12. Text string `json:"text"`
  13. }
  14. func CustomFieldValueChanged(ids ...int64) []string {
  15. ret := make([]string, len(ids))
  16. for i, id := range ids {
  17. ret[i] = fmt.Sprintf("custom_field_%d_value_changed", id)
  18. }
  19. return ret
  20. }