Last active
September 4, 2021 18:39
-
-
Save percybolmer/33fba95f31522641fd7b40254b23309c to your computer and use it in GitHub Desktop.
#ddd-tavern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GetID returns the customers root entity ID | |
func (c *Customer) GetID() uuid.UUID { | |
return c.person.ID | |
} | |
// SetID sets the root ID | |
func (c *Customer) SetID(id uuid.UUID) { | |
if c.person == nil { | |
c.person = &entity.Person{} | |
} | |
c.person.ID = id | |
} | |
// SetName changes the name of the Customer | |
func (c *Customer) SetName(name string) { | |
if c.person == nil { | |
c.person = &entity.Person{} | |
} | |
c.person.Name = name | |
} | |
// SetName changes the name of the Customer | |
func (c *Customer) GetName() string { | |
return c.person.Name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment