embedcup

package
v1.36.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 2 Imported by: 0

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

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 (c *Archive) GetIsArchived() bool

func (*Archive) SetIsArchived added in v1.35.20

func (c *Archive) SetIsArchived(archive bool)

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 (c *Common) GetCreatedAt() time.Time

func (*Common) GetID

func (c *Common) GetID() primitive.ObjectID

func (*Common) GetSchemaVersion

func (c *Common) GetSchemaVersion() string

func (*Common) GetUpdatedAt

func (c *Common) GetUpdatedAt() time.Time

func (*Common) SetCreatedAt

func (c *Common) SetCreatedAt(createdAt time.Time)

func (*Common) SetID

func (c *Common) SetID(id primitive.ObjectID)

func (*Common) SetSchemaVersion

func (c *Common) SetSchemaVersion(version string)

func (*Common) SetUpdatedAt

func (c *Common) SetUpdatedAt(updatedAt time.Time)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL