Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct { ID ids.Id `json:"id" bson:"_id"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` Version int `json:"version" bson:"version"` Tenant string `json:"tenant,omitempty" bson:"tenant,omitempty"` }
Metadata is the metadata for any entity.
func (Metadata) Clone ¶
Clone returns a clone of the entity with a new ID and CreatedAt if necessary. Updates UpdatedAt.
type Updatable ¶ added in v2.2.0
type Updatable interface { // UpdateMetadata updates the metadata of the entity before saving to repository. Returns the updated metadata. UpdateMetadata(ctx context.Context) }
Updatable is an interface for entities that can update their metadata before saving to repository
Click to show internal directories.
Click to hide internal directories.