GraphQL API and utilities for the rpdata project
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.

40 lines
1016 B

  1. package models
  2. import "time"
  3. // Log is the header/session for a log file.
  4. type Log struct {
  5. ID string `bson:"_id"`
  6. ShortID string `bson:"shortId"`
  7. Date time.Time `bson:"date"`
  8. ChannelName string `bson:"channel"`
  9. EventName string `bson:"event,omitempty"`
  10. Title string `bson:"title,omitempty"`
  11. Description string `bson:"description,omitempty"`
  12. Open bool `bson:"open"`
  13. CharacterIDs []string `bson:"characterIds"`
  14. }
  15. // IsChangeObject is an interface implementation to identify it as a valid
  16. // ChangeObject in GQL.
  17. func (*Log) IsChangeObject() {
  18. panic("this method is a dummy, and so is its caller")
  19. }
  20. // A LogFilter is a filter that can be used to list logs.
  21. type LogFilter struct {
  22. Search *string
  23. Open *bool
  24. Characters []string
  25. Channels []string
  26. Events []string
  27. Limit int
  28. }
  29. type LogUpdate struct {
  30. Title *string
  31. EventName *string
  32. Description *string
  33. Open *bool
  34. CharacterIDs []string
  35. }