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.

23 lines
936 B

  1. package models
  2. import "time"
  3. // A Story is user content that does not have a wiki-suitable format. Documents, new stories, short stories, and so on.
  4. // The story model is a container for multiple chapters this time, in contrast to the previous version.
  5. type Story struct {
  6. ID string `bson:"_id"`
  7. Author string `bson:"author"`
  8. Name string `bson:"name"`
  9. Category StoryCategory `bson:"category"`
  10. Open bool `bson:"open"`
  11. Listed bool `bson:"listed"`
  12. Tags []Tag `bson:"tags"`
  13. CreatedDate time.Time `bson:"createdDate"`
  14. FictionalDate time.Time `bson:"fictionalDate,omitempty"`
  15. UpdatedDate time.Time `bson:"updatedDate"`
  16. }
  17. // IsChangeObject is an interface implementation to identify it as a valid
  18. // ChangeObject in GQL.
  19. func (*Story) IsChangeObject() {
  20. panic("this method is a dummy, and so is its caller")
  21. }