type
Document
A stored document with status and version metadata.
Properties
| Property | Type | Description |
|---|---|---|
ID | string | Document identity within its collection. |
CreatedAt | time.Time | Creation timestamp. |
UpdatedAt | time.Time | Last mutation timestamp. |
DeletedAt | *time.Time | Trash timestamp, when deleted. |
Status | Status | Draft or published status. |
Revision | int | Optimistic version revision. |
PublishedRevision | int | PublishedRevision is the revision of the currently visible published head, or zero when the document has never been published or was unpublished. It is not the optimistic-concurrency revision for working content; Revision remains that token on ordinary authoring reads. |
HasDraftChanges | bool | HasDraftChanges is true only on authoring reads when working content has changed since the published head. Published-only reads never disclose it. |
Values | Values | Application field values. |
LocalizationSources | map[string]schema.LocaleCode | Locale that supplied each projected localized field. |
Full signature
type Document struct {
ID string
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time
Status Status
Revision int
// PublishedRevision is the revision of the currently visible published
// head, or zero when the document has never been published or was
// unpublished. It is not the optimistic-concurrency revision for working
// content; Revision remains that token on ordinary authoring reads.
PublishedRevision int
// HasDraftChanges is true only on authoring reads when working content has
// changed since the published head. Published-only reads never disclose it.
HasDraftChanges bool
Values Values
// LocalizationSources records the locale that supplied each projected
// localized field path. It is response metadata and is never persisted.
LocalizationSources map[string]schema.LocaleCode
}