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

     1  package systemssync
     2  
     3  import (
     4  	"time"
     5  )
     6  
     7  // Entity represents the systems last sync timestamps as an entity
     8  type Entity struct {
     9  	ID                string    `db:"id"`
    10  	TenantID          string    `db:"tenant_id"`
    11  	ProductID         string    `db:"product_id"`
    12  	LastSyncTimestamp time.Time `db:"last_sync_timestamp"`
    13  }
    14  
    15  // EntityCollection is a collection of systems last sync timestamp entities
    16  type EntityCollection []*Entity
    17  
    18  // Len is implementation of a repo.Collection interface
    19  func (a EntityCollection) Len() int {
    20  	return len(a)
    21  }