
* refact: generalized back end structs * refact: fixed front end type, removed dead code * removed test image folder * refact: removed dead structs
25 lines
391 B
Go
25 lines
391 B
Go
package document
|
|
|
|
import (
|
|
"textualize/entities"
|
|
)
|
|
|
|
type Entity entities.Document
|
|
|
|
type Area entities.Area
|
|
|
|
func (e *Entity) AddArea(a entities.Area) {
|
|
e.Areas = append(e.Areas, a)
|
|
}
|
|
|
|
func (e *Entity) GetAreaById(areaId string) *entities.Area {
|
|
var foundArea *entities.Area
|
|
|
|
for index, a := range e.Areas {
|
|
if a.Id == areaId {
|
|
foundArea = &e.Areas[index]
|
|
}
|
|
}
|
|
return foundArea
|
|
}
|