3
0

proper struct field names

This commit is contained in:
Tit Petric 2018-07-05 13:05:57 +00:00
parent 0b17420bee
commit a79ce28867
3 changed files with 16 additions and 16 deletions

View File

@ -34,8 +34,8 @@
"path": "module",
"authentication": [],
"struct": [
{ "name": "id", "type": "uint64" },
{ "name": "name", "type": "string" }
{ "name": "ID", "type": "uint64" },
{ "name": "Name", "type": "string" }
],
"apis": [
{

View File

@ -5,11 +5,11 @@
"Interface": "Module",
"Struct": [
{
"name": "id",
"name": "ID",
"type": "uint64"
},
{
"name": "name",
"name": "Name",
"type": "string"
}
],

View File

@ -2,8 +2,8 @@ package crm
// Modules
type Module struct {
id uint64
name string
ID uint64
Name string
changed []string
}
@ -12,25 +12,25 @@ func (Module) new() *Module {
return &Module{}
}
func (m *Module) Getid() uint64 {
return m.id
func (m *Module) GetID() uint64 {
return m.ID
}
func (m *Module) Setid(value uint64) *Module {
if m.id != value {
func (m *Module) SetID(value uint64) *Module {
if m.ID != value {
m.changed = append(m.changed, "id")
m.id = value
m.ID = value
}
return m
}
func (m *Module) Getname() string {
return m.name
func (m *Module) GetName() string {
return m.Name
}
func (m *Module) Setname(value string) *Module {
if m.name != value {
func (m *Module) SetName(value string) *Module {
if m.Name != value {
m.changed = append(m.changed, "name")
m.name = value
m.Name = value
}
return m
}