-
Notifications
You must be signed in to change notification settings - Fork 0
/
duelist.go
39 lines (33 loc) · 916 Bytes
/
duelist.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
32
33
34
35
36
37
38
39
package entities
import (
"time"
"github.com/google/uuid"
)
// NewDuelist creates a new Duelist instance with a generated UUID as the ID
func NewDuelist() Duelist {
return Duelist{
Id: uuid.New().String(),
}
}
// Duelist represents a duelist entity
type Duelist struct {
Id string `json:"id"`
Name string `json:"name"`
Presentation string `json:"presentation"`
BirthDate time.Time `json:"birthDate"`
Address Address `json:"address"`
Contact Contact `json:"contact"`
}
// Address represents the address information of a duelist
type Address struct {
State string `json:"state"`
City string `json:"city"`
Street string `json:"street"`
District string `json:"district"`
Cep string `json:"cep"`
}
// Contact represents the contact information of a duelist.
type Contact struct {
Email string `json:"email"`
Phone string `json:"phone"`
}