File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -4,22 +4,29 @@ import (
4
4
"time"
5
5
)
6
6
7
+ type (
8
+ NotificationStatus uint8
9
+ NotificationSource uint8
10
+ )
11
+
7
12
const (
8
- NotificationStatusUnread = "U"
9
- NotificationStatusRead = "R"
13
+ NotificationStatusUnread NotificationStatus = iota + 1
14
+ NotificationStatusRead
15
+ )
10
16
11
- NotificationSourceIssue = "I"
12
- NotificationSourcePullRequest = "P"
13
- NotificationSourceCommit = "C"
17
+ const (
18
+ NotificationSourceIssue NotificationSource = iota + 1
19
+ NotificationSourcePullRequest
20
+ NotificationSourceCommit
14
21
)
15
22
16
23
type Notification struct {
17
24
ID int64 `xorm:"pk autoincr"`
18
25
UserID int64 `xorm:"INDEX NOT NULL"`
19
26
RepoID int64 `xorm:"INDEX NOT NULL"`
20
27
21
- Status string `xorm:"VARCHAR(1) INDEX NOT NULL"`
22
- Source string `xorm:"VARCHAR(1) INDEX NOT NULL"`
28
+ Status NotificationStatus `xorm:"SMALLINT INDEX NOT NULL"`
29
+ Source NotificationSource `xorm:"SMALLINT INDEX NOT NULL"`
23
30
24
31
IssueID int64 `xorm:"INDEX NOT NULL"`
25
32
PullID int64 `xorm:"INDEX"`
You can’t perform that action at this time.
0 commit comments