Documentation ¶
Overview ¶
Package embedcup contains the common models and embedded structs used across different entities in the Fabriktor. These structs represent shared fields and provide common functionality like Getters and Setters.
Index ¶
- type Common
- func (c *Common) GetCreatedAt() time.Time
- func (c *Common) GetID() primitive.ObjectID
- func (c *Common) GetSchemaVersion() string
- func (c *Common) GetUpdatedAt() time.Time
- func (c *Common) SetCreatedAt(createdAt time.Time)
- func (c *Common) SetID(id primitive.ObjectID)
- func (c *Common) SetSchemaVersion(version string)
- func (c *Common) SetUpdatedAt(updatedAt time.Time)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Common ¶
type Common struct { // The MongoDB ID of the document. // example: 5f6d4b9b9c6f9f0001b9c6f9 // readOnly: true ID *primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` // The schema version of the document. // example: v1 // readOnly: true SchemaVersion *string `bson:"schema_version" json:"schema_version" conform:"lower" validate:"nonnilpointer,nonzeropointerelem"` // The last time the document was updated. // example: 2020-10-05T10:00:00Z // readOnly: true UpdatedAt *time.Time `bson:"updated_at" json:"updated_at" validate:"nonnilpointer,nonzeropointerelem"` // The time the document was created. // example: 2020-10-05T10:00:00Z // readOnly: true CreatedAt *time.Time `bson:"created_at" json:"created_at" validate:"nonnilpointer,nonzeropointerelem"` }
Common represents the common fields for all entities, embedded in all entities. swagger:model
func (*Common) GetCreatedAt ¶
func (*Common) GetSchemaVersion ¶
func (*Common) GetUpdatedAt ¶
func (*Common) SetCreatedAt ¶
func (*Common) SetSchemaVersion ¶
func (*Common) SetUpdatedAt ¶
Click to show internal directories.
Click to hide internal directories.