-
Notifications
You must be signed in to change notification settings - Fork 4
/
subscription.go
55 lines (40 loc) · 1.05 KB
/
subscription.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
package models
import (
"go.mongodb.org/mongo-driver/bson/primitive"
)
// Subscription is a struct used to define
// a manga subscription.
type Subscription struct {
// Internal ID assiged by MongoDB
ID primitive.ObjectID `bson:"_id"`
// Id of the user who added the subscription
UserID int
// User name of the user who added the subscription
UserName string
// Name of the user who added the subscription
FirstName string
// ID of the chat the susbcription is being added on
ChatID int64
// Name of the manga
MangaName string
// URL to the manga
MangaURL string
// URL to the last chapter published for the manga
LastChapterURL string
// Feed this subscription belongs to
MangaFeed int
}
// FeedSubs is a struct used to define
// a subscription to a manga feed.
type FeedSubs struct {
// Internal ID assigned by MongoDB
ID primitive.ObjectID `bson:"_id"`
// URL of the Manga Feed
URL string
// Internal Code of the Manga Feed
Code int
// ID of the Chat subscribed
ChatID int64
// Id of the user subscribed (unused)
UserID int
}