diff options
Diffstat (limited to 'nexus/types/character')
| -rw-r--r-- | nexus/types/character/context.go | 5 | ||||
| -rw-r--r-- | nexus/types/character/request.go | 10 | ||||
| -rw-r--r-- | nexus/types/character/response.go | 16 |
3 files changed, 31 insertions, 0 deletions
diff --git a/nexus/types/character/context.go b/nexus/types/character/context.go new file mode 100644 index 0000000..ac05332 --- /dev/null +++ b/nexus/types/character/context.go @@ -0,0 +1,5 @@ +package character
+
+type IndexContext struct {
+ Characters []Response
+}
diff --git a/nexus/types/character/request.go b/nexus/types/character/request.go new file mode 100644 index 0000000..1c62190 --- /dev/null +++ b/nexus/types/character/request.go @@ -0,0 +1,10 @@ +package character
+
+import "github.com/google/uuid"
+
+type CreateRequest struct {
+ Name string `json:"name"`
+ Race string `json:"race"`
+ StartingKingdom string `json:"starting_kingdom"`
+ RealmID uuid.UUID `json:"realm_id"`
+}
diff --git a/nexus/types/character/response.go b/nexus/types/character/response.go new file mode 100644 index 0000000..5806cb7 --- /dev/null +++ b/nexus/types/character/response.go @@ -0,0 +1,16 @@ +package character
+
+import (
+ "time"
+
+ "github.com/google/uuid"
+)
+
+type Response struct {
+ ID uuid.UUID `json:"id"`
+ Name string `json:"name"`
+ Race string `json:"race"`
+ StartingKingdom string `json:"starting_kingdom"`
+ RealmID uuid.UUID `json:"realm_id"`
+ CreatedAt time.Time `json:"created_at"`
+}
|
