github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/formationtemplate/entity.go (about)

     1  package formationtemplate
     2  
     3  import "database/sql"
     4  
     5  // Entity represents the formation template entity
     6  type Entity struct {
     7  	ID                     string         `db:"id"`
     8  	Name                   string         `db:"name"`
     9  	ApplicationTypes       string         `db:"application_types"`
    10  	RuntimeTypes           sql.NullString `db:"runtime_types"`
    11  	RuntimeTypeDisplayName sql.NullString `db:"runtime_type_display_name"`
    12  	RuntimeArtifactKind    sql.NullString `db:"runtime_artifact_kind"`
    13  	LeadingProductIDs      sql.NullString `db:"leading_product_ids"`
    14  	TenantID               sql.NullString `db:"tenant_id"`
    15  }
    16  
    17  // EntityCollection is a collection of formation template entities.
    18  type EntityCollection []*Entity
    19  
    20  // Len returns the number of entities in the collection.
    21  func (s EntityCollection) Len() int {
    22  	return len(s)
    23  }