-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
zone.go
27 lines (21 loc) · 894 Bytes
/
zone.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
package v2
import (
"github.com/goccy/go-json"
"github.com/uptrace/bun"
"gopkg.in/guregu/null.v3"
"exusiai.dev/backend-next/internal/model"
)
type Zone struct {
bun.BaseModel `bun:"zones"`
ZoneID int `bun:",pk,autoincrement" json:"-"`
ArkZoneID string `json:"zoneId"`
Index int `json:"zoneIndex"`
Category string `json:"type"`
Type null.String `json:"subType" swaggertype:"string"`
ZoneName string `bun:"-" json:"zoneName"`
ZoneNameI18n json.RawMessage `bun:"name" json:"zoneName_i18n" swaggertype:"object"`
Existence json.RawMessage `json:"existence" swaggertype:"object"`
Background null.String `json:"background,omitempty" swaggertype:"string"`
StageIds []string `bun:"-" json:"stages"`
Stages []*model.Stage `bun:"rel:has-many,join:zone_id=zone_id" json:"-"`
}