relationship

package
v1.0.43 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CardinalitySliceToJSON

func CardinalitySliceToJSON(in []Cardinality) json.RawMessage

func RelationshipSliceToJSON

func RelationshipSliceToJSON(e []Relationship) json.RawMessage

func RelationshipToJSON

func RelationshipToJSON(e Relationship) json.RawMessage

func StatusSliceToJSON

func StatusSliceToJSON(in []Status) json.RawMessage

Types

type Cardinality

type Cardinality int64
const (
	CARDINALITY_INVALID Cardinality = iota
	CARDINALITY_ONE_TO_ONE
	CARDINALITY_ONE_TO_MANY
)

func CardinalityFromPointerString

func CardinalityFromPointerString(in *string) Cardinality

func CardinalityFromString

func CardinalityFromString(in string) Cardinality

func JSONToCardinalitySlice

func JSONToCardinalitySlice(in json.RawMessage) []Cardinality

func (Cardinality) String

func (e Cardinality) String() string

func (Cardinality) StringPtr

func (e Cardinality) StringPtr() *string

func (Cardinality) ToInt64

func (e Cardinality) ToInt64() int64

type Relationship

type Relationship struct {
	UUID          uuid.UUID                          `json:"uuid"`
	Version       int64                              `json:"version"`
	Identifier    string                             `json:"identifier"`
	Description   *string                            `json:"description"`
	Cardinality   Cardinality                        `json:"cardinality"`
	From          relationship_node.RelationshipNode `json:"from"`
	To            relationship_node.RelationshipNode `json:"to"`
	UseForeignKey bool                               `json:"use_foreign_key"`
	Status        Status                             `json:"status"`
	CreatedAt     time.Time                          `json:"created_at"`
	UpdatedAt     time.Time                          `json:"updated_at"`
	CreatedByUUID uuid.UUID                          `json:"created_by_uuid"`
	UpdatedByUUID uuid.UUID                          `json:"updated_by_uuid"`
}

func NewRelationshipSliceWithRandomValues

func NewRelationshipSliceWithRandomValues(n int) []Relationship

func NewRelationshipWithRandomValues

func NewRelationshipWithRandomValues() Relationship

func RelationshipFromJSON

func RelationshipFromJSON(data json.RawMessage) Relationship

func RelationshipSliceFromJSON

func RelationshipSliceFromJSON(data json.RawMessage) []Relationship

func (Relationship) ArrayFieldIdentifierToType

func (e Relationship) ArrayFieldIdentifierToType() map[string]types.FieldType

func (Relationship) EntityIdentifier

func (e Relationship) EntityIdentifier() string

func (Relationship) FieldIdentfierToTypeMap

func (e Relationship) FieldIdentfierToTypeMap() map[string]types.FieldType

func (Relationship) IsDependant

func (e Relationship) IsDependant() bool

func (Relationship) OrderedFieldIdentifiers added in v1.0.35

func (e Relationship) OrderedFieldIdentifiers() []string

func (Relationship) String

func (e Relationship) String() string

func (Relationship) ToJSON

func (e Relationship) ToJSON() json.RawMessage

type Status

type Status int64
const (
	STATUS_INVALID Status = iota
	STATUS_ACTIVE
	STATUS_DISABLED
)

func JSONToStatusSlice

func JSONToStatusSlice(in json.RawMessage) []Status

func StatusFromPointerString

func StatusFromPointerString(in *string) Status

func StatusFromString

func StatusFromString(in string) Status

func (Status) String

func (e Status) String() string

func (Status) StringPtr

func (e Status) StringPtr() *string

func (Status) ToInt64

func (e Status) ToInt64() int64

Jump to

Keyboard shortcuts

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