package types import ( "time" "git.aiterp.net/rpdata/api/model/story" ) // ChapterResolver for the Chapter graphql type type ChapterResolver struct{ C story.Chapter } // ID resolves Chapter.id func (r *ChapterResolver) ID() string { return r.C.ID } // StoryID resolves Chapter.storyId func (r *ChapterResolver) StoryID() string { return r.C.StoryID } // Title resolves Chapter.title func (r *ChapterResolver) Title() string { return r.C.Title } // Author resolves Chapter.author func (r *ChapterResolver) Author() string { return r.C.Author } // Source resolves Chapter.source func (r *ChapterResolver) Source() string { return r.C.Source } // CreatedDate resolves Chapter.createdDate func (r *ChapterResolver) CreatedDate() string { return r.C.CreatedDate.Format(time.RFC3339Nano) } // FictionalDate resolves Chapter.fictionalDate func (r *ChapterResolver) FictionalDate() string { return r.C.FictionalDate.Format(time.RFC3339Nano) } // EditedDate resolves Chapter.editedDate func (r *ChapterResolver) EditedDate() string { return r.C.EditedDate.Format(time.RFC3339Nano) }