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.
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 Archive
- 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 Archive ¶ added in v1.35.20
type Archive struct { // Indicates whether the document is archived. // example: false // required: false IsArchived *bool `bson:"is_archived" json:"is_archived" validate:"nonnilpointer"` }
Archive provides a mechanism to flag documents as archived.
This flag enables filtering without preventing access to archived documents.
It serves as an alternative to deletion, helping maintain data integrity and supporting queries for deprecated or legacy documents. swagger:model
func (*Archive) GetIsArchived ¶ added in v1.35.20
func (*Archive) SetIsArchived ¶ added in v1.35.20
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