-
Notifications
You must be signed in to change notification settings - Fork 377
/
activities.go
60 lines (52 loc) · 1.86 KB
/
activities.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
49
50
51
52
53
54
55
56
57
58
59
60
// Copyright (c) 2021 Terminus, Inc.
//
// This program is free software: you can use, redistribute, and/or modify
// it under the terms of the GNU Affero General Public License, version 3
// or later ("AGPL"), as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package apistructs
import (
"time"
)
// ActivitiyListRequest GET /api/activities 活动查询请求结构
type ActivitiyListRequest struct {
OrgID int64 `query:"orgId"`
ProjectID int64 `query:"projectId"`
ApplicationID int64 `query:"applicationId"`
RuntimeID int64 `query:"runtimeId"`
UserID string `query:"userId"`
// default 1
PageNo int `query:"pageNo"`
// default 20
PageSize int `query:"pageSize"`
}
// ActivityListResponse GET api/activities 活动查询响应结构
type ActivityListResponse struct {
Header
Data ActivityListResponseData `json:"data"`
}
// ActivityListResponse 活动列表返回结构
type ActivityListResponseData struct {
Total int `json:"total"`
List []ActivityDTO `json:"list"`
}
// ActivityDTO 活动结构
type ActivityDTO struct {
ID int64 `json:"id"`
OrgID int64 `json:"orgId"`
ProjectID int64 `json:"projectId"`
ApplicationID int64 `json:"applicationId"`
RuntimeID int64 `json:"runtimeId"`
UserID string `json:"userId"`
Type string `json:"type"`
Action string `json:"action"`
Desc string `json:"desc"`
Context interface{} `json:"context"`
CreatedAt time.Time `json:"createdAt"`
}