-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
48 lines (40 loc) · 1.06 KB
/
models.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package main
import (
"time"
)
type Profile struct {
ID string `json:"id"`
Name string `json:"name"`
Coins int `json:"coins"`
Organization bool `json:"organization"`
}
type Task struct {
ID int `json:"id"`
CreatedBy string `json:"created_by"`
DateToComplete time.Time `json:"date_to_complete"`
TaskType string `json:"task_type"`
TimeToComplete int `json:"time_to_complete"`
Lat float64 `json:"lat"`
Long float64 `json:"long"`
Reward int `json:"reward"`
Description string `json:"description"`
Location string `json:"location"`
}
// type TaskResponse struct {
// Task
// Distance int `json:"distance"`
// }
// type TaskRequest struct {
// Task
// Lat float64 `json:"lat"`
// Long float64 `json:"long"`
// }
type TasksAccepted struct {
UID string `json:"uid"`
TaskID int `json:"task_id"`
}
type GetTaskResponse []*Task
type TaskCompleteRequest struct {
UID string `json:"uid"`
TaskID int `json:"task_id"`
}