initial commit lets start
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user