dorfylegends/backend/model/extensions.go
Robert Janetzko 5f200e7fd5 same fields
2022-04-18 08:36:29 +00:00

29 lines
442 B
Go

package model
func (e *Entity) Position(id int) *EntityPosition {
for _, p := range e.EntityPosition {
if p.Id_ == id {
return p
}
}
return nil
}
type HistoricalEventDetails interface {
RelatedToEntity(int) bool
RelatedToHf(int) bool
Html() string
}
type HistoricalEventCollectionDetails interface {
}
func containsInt(list []int, id int) bool {
for _, v := range list {
if v == id {
return true
}
}
return false
}