2020-06-14 16:37:31 +08:00
|
|
|
// Copyright 2020 The casbin Authors. All Rights Reserved.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
package object
|
|
|
|
|
2022-09-29 00:37:37 +08:00
|
|
|
import "github.com/casdoor/casdoor-go-sdk/casdoorsdk"
|
2021-08-21 12:44:19 +08:00
|
|
|
|
2020-06-14 16:37:31 +08:00
|
|
|
type LatestReply struct {
|
2020-11-02 00:47:45 +08:00
|
|
|
TopicId int `xorm:"id" json:"topicId"`
|
2020-06-14 16:37:31 +08:00
|
|
|
NodeId string `json:"nodeId"`
|
|
|
|
NodeName string `json:"nodeName"`
|
|
|
|
Author string `json:"author"`
|
2020-11-02 00:47:45 +08:00
|
|
|
ReplyContent string `xorm:"content" json:"replyContent"`
|
|
|
|
TopicTitle string `xorm:"title" json:"topicTitle"`
|
|
|
|
ReplyTime string `xorm:"created_time" json:"replyTime"`
|
2021-07-28 19:10:35 +08:00
|
|
|
TopicAuthor string `xorm:"author" json:"topicAuthor"`
|
2020-06-14 16:37:31 +08:00
|
|
|
}
|
2020-06-30 12:13:47 +08:00
|
|
|
|
2020-07-07 00:33:29 +08:00
|
|
|
type TopicWithAvatar struct {
|
2020-10-13 15:32:50 +08:00
|
|
|
Topic `xorm:"extends"`
|
2020-08-13 13:07:38 +08:00
|
|
|
Avatar string `json:"avatar"`
|
|
|
|
ThanksStatus bool `json:"thanksStatus"`
|
|
|
|
Editable bool `json:"editable"`
|
|
|
|
NodeModerator bool `json:"nodeModerator"`
|
2020-07-07 00:33:29 +08:00
|
|
|
}
|
|
|
|
|
2020-08-16 22:47:31 +08:00
|
|
|
type NodeTopic struct {
|
2020-10-13 15:32:50 +08:00
|
|
|
Topic `xorm:"extends"`
|
2020-08-16 22:47:31 +08:00
|
|
|
Avatar string `json:"avatar"`
|
|
|
|
ThanksStatus bool `json:"thanksStatus"`
|
|
|
|
Editable bool `json:"editable"`
|
|
|
|
NodeModerator bool `json:"nodeModerator"`
|
|
|
|
ContentLength int `json:"contentLength"`
|
|
|
|
}
|
|
|
|
|
2020-07-07 00:33:29 +08:00
|
|
|
type ReplyWithAvatar struct {
|
2020-11-01 16:53:55 +08:00
|
|
|
Reply `xorm:"extends"`
|
2021-08-07 20:14:07 +08:00
|
|
|
Avatar string `json:"avatar"`
|
|
|
|
ThanksStatus bool `json:"thanksStatus"`
|
|
|
|
Deletable bool `json:"deletable"`
|
|
|
|
Editable bool `json:"editable"`
|
|
|
|
ConsumptionAmount int `xorm:"amount" json:"amount"`
|
|
|
|
Child []*ReplyWithAvatar `json:"child"`
|
2020-07-07 00:33:29 +08:00
|
|
|
}
|
|
|
|
|
2020-06-30 12:13:47 +08:00
|
|
|
type NodeFavoritesRes struct {
|
|
|
|
NodeInfo *Node `json:"nodeInfo"`
|
|
|
|
TopicNum int `json:"topicNum"`
|
|
|
|
}
|
2020-07-17 13:14:40 +08:00
|
|
|
|
|
|
|
type CommunityHealth struct {
|
|
|
|
Member int `json:"member"`
|
|
|
|
Topic int `json:"topic"`
|
|
|
|
Reply int `json:"reply"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type NodeRelation struct {
|
2020-07-21 21:01:41 +08:00
|
|
|
ParentNode *Node `json:"parentNode"`
|
2020-07-17 13:14:40 +08:00
|
|
|
RelatedNode []*Node `json:"relatedNode"`
|
2020-07-21 21:01:41 +08:00
|
|
|
ChildNode []*Node `json:"childNode"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type NotificationResponse struct {
|
2020-10-31 02:18:21 +08:00
|
|
|
*Notification `xorm:"extends"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Content string `json:"content"`
|
|
|
|
Avatar string `json:"avatar"`
|
2020-07-17 13:14:40 +08:00
|
|
|
}
|
2020-07-25 20:08:52 +08:00
|
|
|
|
|
|
|
type NodeNavigationResponse struct {
|
|
|
|
*Tab
|
|
|
|
Nodes []*Node `json:"nodes"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type PlaneWithNodes struct {
|
|
|
|
*Plane
|
|
|
|
Nodes []*Node `json:"nodes"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type BalanceResponse struct {
|
|
|
|
Amount int `json:"amount"`
|
|
|
|
Title string `json:"title"`
|
|
|
|
Length int `json:"length"`
|
|
|
|
Balance int `json:"balance"`
|
2020-08-03 22:38:15 +08:00
|
|
|
ObjectId int `json:"objectId"`
|
2020-07-25 20:08:52 +08:00
|
|
|
ReceiverId string `json:"receiverId"`
|
|
|
|
ConsumerId string `json:"consumerId"`
|
|
|
|
CreatedTime string `json:"createdTime"`
|
|
|
|
ConsumptionType int `json:"consumptionType"`
|
|
|
|
}
|
2020-09-16 07:55:09 +08:00
|
|
|
|
|
|
|
type AdminTabInfo struct {
|
|
|
|
Id string `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Sorter int `json:"sorter"`
|
|
|
|
CreatedTime string `json:"createdTime"`
|
|
|
|
DefaultNode string `json:"defaultNode"`
|
|
|
|
HomePage bool `json:"homePage"`
|
|
|
|
NodesNum int `json:"nodesNum"`
|
|
|
|
TopicsNum int `json:"topicsNum"`
|
|
|
|
}
|
2020-09-20 10:30:39 +08:00
|
|
|
|
|
|
|
type AdminMemberInfo struct {
|
2022-09-29 00:37:37 +08:00
|
|
|
casdoorsdk.User
|
2020-09-20 10:30:39 +08:00
|
|
|
FileQuota int `json:"fileQuota"`
|
|
|
|
FileUploadNum int `json:"fileUploadNum"`
|
|
|
|
Status int `json:"status"`
|
|
|
|
TopicNum int `json:"topicNum"`
|
|
|
|
ReplyNum int `json:"replyNum"`
|
|
|
|
LatestLogin string `json:"latestLogin"`
|
2021-06-23 16:41:41 +08:00
|
|
|
Score int `json:"score"`
|
2020-09-20 10:30:39 +08:00
|
|
|
}
|
2020-09-23 13:37:12 +08:00
|
|
|
|
|
|
|
type AdminPlaneInfo struct {
|
|
|
|
Plane
|
|
|
|
Sorter int `json:"sorter"`
|
|
|
|
Visible bool `json:"visible"`
|
|
|
|
NodesNum int `json:"nodesNum"`
|
|
|
|
Nodes []*Node `json:"nodes"`
|
|
|
|
}
|
2020-09-29 02:41:22 +08:00
|
|
|
|
|
|
|
type AdminTopicInfo struct {
|
|
|
|
Topic
|
|
|
|
Deleted bool `json:"deleted"`
|
|
|
|
}
|