Files
2026-08-28 17:59:35 +02:00

31 lines
785 B
Go

package models
import (
"encoding/xml"
"time"
)
type ContentHeader struct {
XMLName xml.Name `xml:"contentHeader"`
Name string `xml:"name,attr"`
ModificationDateTime string `xml:"modificationDateTime,attr"`
CoordinateInfo CoordinateInfo `xml:"coordinateInfo"`
AddData *AddData `xml:"addData"`
}
func (c *ContentHeader) SetCurrentCreationDateTime() {
//format "2026-08-25T21:35:38.4736792"
c.ModificationDateTime = time.Now().Format("2006-01-02T15:04:05.0000000")
}
func (c *ContentHeader) SetCoordinateDefault() {
c.CoordinateInfo.Default()
}
func (c *ContentHeader) AddAddData() *AddData {
if c.AddData == nil {
c.AddData = NewAddData()
}
return c.AddData
}