package models import "time" // A Story is user content that does not have a wiki-suitable format. Documents, new stories, short stories, and so on. // The story model is a container for multiple chapters this time, in contrast to the previous version. type Story struct { ID string `bson:"_id"` Author string `bson:"author"` Name string `bson:"name"` Category StoryCategory `bson:"category"` Open bool `bson:"open"` Listed bool `bson:"listed"` Tags []Tag `bson:"tags"` CreatedDate time.Time `bson:"createdDate"` FictionalDate time.Time `bson:"fictionalDate,omitempty"` UpdatedDate time.Time `bson:"updatedDate"` } // IsChangeObject is an interface implementation to identify it as a valid // ChangeObject in GQL. func (*Story) IsChangeObject() { panic("this method is a dummy, and so is its caller") } type StoryFilter struct { Author *string Tags []Tag EarliestFictionalDate time.Time LatestFictionalDate time.Time Category *StoryCategory Open *bool Unlisted *bool Limit int } type StoryUpdate struct { Name *string Category *StoryCategory Author *string Open *bool Listed *bool FictionalDate *time.Time UpdatedDate *time.Time }