mirror of
https://github.com/arnaucube/gogame.git
synced 2026-02-06 19:16:40 +01:00
initial structure
This commit is contained in:
10
models/galaxy.go
Normal file
10
models/galaxy.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package models
|
||||
|
||||
type Galaxy struct {
|
||||
SolarSystem []string
|
||||
}
|
||||
|
||||
type SolarSystem struct {
|
||||
Id string
|
||||
Planets []string // array with ids of the planets
|
||||
}
|
||||
8
models/planet.go
Normal file
8
models/planet.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package models
|
||||
|
||||
type Planet struct {
|
||||
Id string
|
||||
Size int64 // fields
|
||||
Name string
|
||||
OwnerId string
|
||||
}
|
||||
18
models/user.go
Normal file
18
models/user.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package models
|
||||
|
||||
type Resource struct {
|
||||
Value int64
|
||||
Max int64
|
||||
}
|
||||
|
||||
type User struct {
|
||||
Id string
|
||||
Name string
|
||||
Email string
|
||||
Resources struct {
|
||||
Metal Resource
|
||||
Crystal Resource
|
||||
Deuterium Resource
|
||||
Energy Resource
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user