-
Notifications
You must be signed in to change notification settings - Fork 62
/
topic.go
91 lines (71 loc) · 1.88 KB
/
topic.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// SPDX-License-Identifier: AGPL-3.0-only
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, version 3.
//
// 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.
// See the GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>
package dao
import (
"time"
)
func (t *GroupTopic) GetTitle() string {
return t.Title
}
func (t *SubjectTopic) GetTitle() string {
return t.Title
}
func (t *SubjectTopic) GetCreateTime() time.Time {
return time.Unix(int64(t.CreatedTime), 0)
}
func (t *SubjectTopic) GetUpdateTime() time.Time {
return time.Unix(int64(t.UpdatedTime), 0)
}
func (t *SubjectTopic) GetID() uint32 {
return t.ID
}
func (t *SubjectTopic) GetCreatorID() uint32 {
return t.UID
}
func (t *SubjectTopic) GetState() uint8 {
return t.State
}
func (t *GroupTopic) GetCreateTime() time.Time {
return time.Unix(int64(t.CreatedTime), 0)
}
func (t *GroupTopic) GetUpdateTime() time.Time {
return time.Unix(int64(t.UpdatedTime), 0)
}
func (t *GroupTopic) GetID() uint32 {
return t.ID
}
func (t *GroupTopic) GetCreatorID() uint32 {
return t.UID
}
func (t *GroupTopic) GetState() uint8 {
return t.State
}
func (t *GroupTopic) GetReplies() uint32 {
return t.Replies
}
func (t *SubjectTopic) GetReplies() uint32 {
return t.Replies
}
func (t *SubjectTopic) GetObjectID() uint32 {
return t.SubjectID
}
func (t *GroupTopic) GetObjectID() uint32 {
return t.GroupID
}
func (t *SubjectTopic) GetStatus() uint8 {
return t.Status
}
func (t *GroupTopic) GetStatus() uint8 {
return t.Status
}