github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/formationassignment/entity.go (about) 1 package formationassignment 2 3 import "database/sql" 4 5 // Entity represents the formation assignments entity 6 type Entity struct { 7 ID string `db:"id"` 8 FormationID string `db:"formation_id"` 9 TenantID string `db:"tenant_id"` 10 Source string `db:"source"` 11 SourceType string `db:"source_type"` 12 Target string `db:"target"` 13 TargetType string `db:"target_type"` 14 State string `db:"state"` 15 Value sql.NullString `db:"value"` 16 } 17 18 // EntityCollection is a collection of formation assignments entities. 19 type EntityCollection []*Entity 20 21 // Len is implementation of a repo.Collection interface 22 func (s EntityCollection) Len() int { 23 return len(s) 24 }