-
Notifications
You must be signed in to change notification settings - Fork 0
/
entity.go
31 lines (27 loc) · 933 Bytes
/
entity.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package shopware
// Entity is a shopware base entity
// https://github.com/shopware/platform/blob/6.2/src/Core/Framework/DataAbstractionLayer/Entity.php
type Entity struct {
ID string `json:"id"`
UniqueIdentifier string `json:"_uniqueIdentifier"`
EntityName string `json:"_entityName"`
VersionID string `json:"versionId"`
Translated interface{} `json:"translated"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
// GetID returns the ID of entity
func (e *Entity) GetID() string {
return e.ID
}
// SetID sets the ID of entity
func (e *Entity) SetID(id string) {
e.ID = id
e.UniqueIdentifier = id
}
// TranslationEntity see:
// https://github.com/shopware/platform/blob/6.2/src/Core/Framework/DataAbstractionLayer/TranslationEntity.php
type TranslationEntity struct {
Entity
LanguageID string `json:"languageId"`
}