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

     1  package formation
     2  
     3  import "database/sql"
     4  
     5  // Entity represents the formation entity
     6  type Entity struct {
     7  	ID                  string         `db:"id"`
     8  	TenantID            string         `db:"tenant_id"`
     9  	FormationTemplateID string         `db:"formation_template_id"`
    10  	Name                string         `db:"name"`
    11  	State               string         `db:"state"`
    12  	Error               sql.NullString `db:"error"`
    13  }
    14  
    15  // EntityCollection is a collection of formation entities.
    16  type EntityCollection []*Entity
    17  
    18  // Len returns the number of entities in the collection.
    19  func (s EntityCollection) Len() int {
    20  	return len(s)
    21  }