dorfylegends/backend/model/extensions.go

29 lines
442 B
Go
Raw Normal View History

2022-04-16 23:12:23 +03:00
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 {
2022-04-18 11:36:29 +03:00
RelatedToEntity(int) bool
2022-04-16 23:12:23 +03:00
RelatedToHf(int) bool
2022-04-18 11:36:29 +03:00
Html() string
2022-04-16 23:12:23 +03:00
}
type HistoricalEventCollectionDetails interface {
}
2022-04-18 11:36:29 +03:00
func containsInt(list []int, id int) bool {
for _, v := range list {
if v == id {
return true
}
}
return false
}