summaryrefslogtreecommitdiff
path: root/server/guest/models.go
blob: f7927896dd61a5af5abbd4a6048ceabf261a964d (plain)
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
package guest

import "github.com/golang-jwt/jwt/v5"

type Guest struct {
	ID         int           `json:"id"`
	FirstName  string        `json:"firstName"`
	LastName   string        `json:"lastName"`
	Attendance string        `json:"attendance"`
	Email      string        `json:"email"`
	Message    string        `json:"message"`
	PartySize  int           `json:"partySize"`
	PartyList  []PartyMember `json:"partyList"`
}

type PartyMember struct {
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
}

type Credentials struct {
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
}

type Claims struct {
	Credentials Credentials `json:"credentials"`
	jwt.RegisteredClaims
}

type LoginResponse struct {
	Guest Guest  `json:"guest"`
	Token string `json:"token"`
}