29 lines
678 B
Go
29 lines
678 B
Go
package design
|
|
|
|
import (
|
|
. "goa.design/goa/v3/dsl"
|
|
)
|
|
|
|
var Item = Type("item", func() {
|
|
Field(1, "name", String)
|
|
Field(2, "description", String)
|
|
Field(3, "damage", Int)
|
|
Field(4, "healing", Int)
|
|
Field(5, "protection", Int)
|
|
Required("name", "description", "damage", "healing", "protection")
|
|
})
|
|
|
|
var Character = Type("character", func() {
|
|
Field(1, "name", String)
|
|
Field(2, "description", String)
|
|
Field(3, "health", Int)
|
|
Field(4, "experience", Int)
|
|
Required("name", "description", "health", "experience")
|
|
})
|
|
|
|
var InventoryRecord = Type("inventoryRecord", func() {
|
|
Field(1, "characterName", String)
|
|
Field(2, "itemName", String)
|
|
Required("characterName", "itemName")
|
|
})
|