model

package
v0.30.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2022 License: AGPL-3.0, AGPL-3.0-only Imports: 7 Imported by: 0

Documentation

Overview

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/>

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/>

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/>

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/>

Index

Constants

View Source
const (
	RevisionTypeSubject                  = 1  // 条目
	RevisionTypeSubjectCharacterRelation = 5  // 条目->角色关联
	RevisionTypeSubjectCastRelation      = 6  // 条目->声优关联
	RevisionTypeSubjectPersonRelation    = 10 // 条目->人物关联
	RevisionTypeSubjectMerge             = 11 // 条目管理
	RevisionTypeSubjectErase             = 12
	RevisionTypeSubjectRelation          = 17 // 条目关联
	RevisionTypeSubjectLock              = 103
	RevisionTypeSubjectUnlock            = 104
	RevisionTypeCharacter                = 2  // 角色
	RevisionTypeCharacterSubjectRelation = 4  // 角色->条目关联
	RevisionTypeCharacterCastRelation    = 7  // 角色->声优关联
	RevisionTypeCharacterMerge           = 13 // 角色管理
	RevisionTypeCharacterErase           = 14
	RevisionTypePerson                   = 3  // 人物
	RevisionTypePersonCastRelation       = 8  // 人物->声优关联
	RevisionTypePersonSubjectRelation    = 9  // 人物->条目关联
	RevisionTypePersonMerge              = 15 // 人物管理
	RevisionTypePersonErase              = 16
	RevisionTypeEp                       = 18  // 章节
	RevisionTypeEpMerge                  = 181 // 章节管理
	RevisionTypeEpMove                   = 182
	RevisionTypeEpLock                   = 183
	RevisionTypeEpUnlock                 = 184
	RevisionTypeEpErase                  = 185
)

Variables

This section is empty.

Functions

func CharacterRevisionTypes

func CharacterRevisionTypes() []uint8

func EpisodeRevisionTypes added in v0.30.0

func EpisodeRevisionTypes() []uint8

func PersonRevisionTypes

func PersonRevisionTypes() []uint8

func SubjectTypeString

func SubjectTypeString(s uint8) string

Types

type Character

type Character struct {
	Name           string
	Image          string
	Infobox        string
	Summary        string
	ID             CharacterID
	Redirect       CharacterID
	CollectCount   uint32
	CommentCount   uint32
	FieldBirthYear uint16
	Producer       bool
	Type           uint8
	Artist         bool
	Seiyu          bool
	Writer         bool
	Illustrator    bool
	Actor          bool
	FieldBloodType uint8
	FieldGender    uint8
	FieldBirthMon  uint8
	Locked         bool
	FieldBirthDay  uint8
	NSFW           bool
}

type CharacterID added in v0.20.2

type CharacterID uint32

func (CharacterID) Value added in v0.20.2

func (v CharacterID) Value() (driver.Value, error)

type CharacterRevision

type CharacterRevision struct {
	Data CharacterRevisionData
	RevisionCommon
}

CharacterRevision concrete revision data type.

type CharacterRevisionData

type CharacterRevisionData map[string]CharacterRevisionDataItem

type CharacterRevisionDataItem added in v0.16.9

type CharacterRevisionDataItem struct {
	Name    string `json:"name" mapstructure:"crt_name"`
	InfoBox string `json:"infobox" mapstructure:"crt_infobox"`
	Summary string `json:"summary"`
	Extra   Extra  `json:"extra"`
}

type CollectPrivacy added in v0.23.8

type CollectPrivacy uint8
const (
	// CollectPrivacyNone 默认公开收藏。
	CollectPrivacyNone CollectPrivacy = 0
	// CollectPrivacySelf 私有收藏,正常计入评分。
	CollectPrivacySelf CollectPrivacy = 1
	// CollectPrivacyBan Shadow Ban, 显示为私有收藏,不计入评分。
	CollectPrivacyBan CollectPrivacy = 2
)

type Comment added in v0.22.0

type Comment struct {
	CreatedAt   time.Time
	Content     string
	SubComments []SubComment
	CreatorID   UserID
	ID          CommentID
	State       CommentState
}

type CommentID added in v0.22.0

type CommentID uint32

type CommentState added in v0.22.0

type CommentState uint8
const (
	CommentStateNone CommentState = 0 // 正常
	// CommentStateAdminCloseTopic 管理员关闭主题 https://bgm.tv/subject/topic/12629#post_108127
	CommentStateAdminCloseTopic CommentState = 1 // 关闭
	CommentStateAdminReopen     CommentState = 2 // 重开
	CommentStateAdminPin        CommentState = 3 // 置顶
	CommentStateAdminMerge      CommentState = 4 // 合并
	// CommentStateAdminSilentTopic 管理员下沉 https://bgm.tv/subject/topic/18784#post_160402
	CommentStateAdminSilentTopic CommentState = 5 // 下沉
	CommentStateUserDelete       CommentState = 6 // 自行删除
	CommentStateAdminDelete      CommentState = 7 // 管理员删除
)

type Count

type Count struct {
	Field1  uint32
	Field2  uint32
	Field3  uint32
	Field4  uint32
	Field5  uint32
	Field6  uint32
	Field7  uint32
	Field8  uint32
	Field9  uint32
	Field10 uint32
}

type EpType added in v0.20.2

type EpType = uint8
const (
	EpTypeNormal  EpType = 0
	EpTypeSpecial EpType = 1
	EpTypeOpening EpType = 2
	EpTypeEnding  EpType = 3
	EpTypeMad     EpType = 4
	EpTypeOther   EpType = 6
)

type Episode

type Episode struct {
	Airdate     string
	Name        string
	NameCN      string
	Duration    string
	Description string
	Ep          float32
	SubjectID   SubjectID
	Sort        float32
	Comment     uint32
	ID          EpisodeID
	Type        EpType
	Disc        uint8
}

func (Episode) Less added in v0.23.7

func (e Episode) Less(o Episode) bool

type EpisodeCollection added in v0.22.5

type EpisodeCollection uint8
const (
	EpisodeCollectionNone    EpisodeCollection = 0 // 撤消/删除
	EpisodeCollectionAll     EpisodeCollection = 0 // 全部
	EpisodeCollectionWish    EpisodeCollection = 1 // 想看
	EpisodeCollectionDone    EpisodeCollection = 2 // 看过
	EpisodeCollectionDropped EpisodeCollection = 3 // 抛弃
)

func (*EpisodeCollection) UnmarshalJSON added in v0.27.0

func (s *EpisodeCollection) UnmarshalJSON(bytes []byte) error

type EpisodeID added in v0.20.2

type EpisodeID uint32

func (EpisodeID) Value added in v0.20.2

func (v EpisodeID) Value() (driver.Value, error)

func (EpisodeID) Zap added in v0.27.1

func (v EpisodeID) Zap() zap.Field

type EpisodeRevision added in v0.30.0

type EpisodeRevision struct {
	Data EpisodeRevisionData
	RevisionCommon
}

EpisodeRevision concrete revision data type.

type EpisodeRevisionData added in v0.30.0

type EpisodeRevisionData map[string]EpisodeRevisionDataItem

type EpisodeRevisionDataItem added in v0.30.0

type EpisodeRevisionDataItem struct {
	Airdate  string `json:"airdate" mapstructure:"ep_airdate"`
	Desc     string `json:"desc" mapstructure:"ep_desc"`
	Duration string `json:"duration" mapstructure:"ep_duration"`
	Name     string `json:"name" mapstructure:"ep_name"`
	NameCn   string `json:"name_cn" mapstructure:"ep_name_cn"`
	Sort     string `json:"sort" mapstructure:"ep_sort"`
	Type     string `json:"type" mapstructure:"ep_type"`
}

type Extra

type Extra struct {
	Img string `json:"img,omitempty"`
}

type Group added in v0.20.9

type Group struct {
	CreatedAt   time.Time
	Name        string
	Icon        string
	Description string
	Title       string
	ID          GroupID
	NSFW        bool
	MemberCount int64
}

type GroupID

type GroupID uint16

func (GroupID) Value added in v0.20.9

func (v GroupID) Value() (driver.Value, error)

func (GroupID) Zap added in v0.24.1

func (v GroupID) Zap() zap.Field

type GroupMember added in v0.20.9

type GroupMember struct {
	JoinAt time.Time
	UserID UserID
	Mod    bool
}

type Index

type Index struct {
	CreatedAt   time.Time
	UpdatedAt   time.Time
	Title       string
	Description string
	CreatorID   UserID
	Total       uint32
	ID          IndexID
	Comments    uint32
	Collects    uint32
	Ban         bool
	NSFW        bool
}

type IndexID added in v0.20.2

type IndexID = uint32

type Notification added in v0.29.0

type Notification struct {
	CreatedTime time.Time
	ID          NotificationID
	ReceiverID  UserID
	SenderID    UserID
	FieldID     NotificationFieldID
	RelatedID   uint32 // 触发通知的实际事项id,如回复的
	Type        NotificationType
	Status      NotificationStatus
}

type NotificationField added in v0.29.0

type NotificationField struct {
	Title       string
	ID          NotificationFieldID
	RelatedID   uint32 // 关联的主体事项的id,条目讨论,日志的
	RelatedType uint8  // 关联的主体事项的分类
}

type NotificationFieldID added in v0.29.0

type NotificationFieldID uint32

type NotificationID added in v0.29.0

type NotificationID uint32

type NotificationStatus added in v0.29.0

type NotificationStatus uint8
const (
	NotificationStatusRead   NotificationStatus = 0
	NotificationStatusUnread NotificationStatus = 1
)

func (NotificationStatus) Value added in v0.29.0

func (v NotificationStatus) Value() (driver.Value, error)

type NotificationType added in v0.29.0

type NotificationType uint8
const (
	NotificationTypeGroupTopicReply                NotificationType = 1  // 发起的小组话题有新回复
	NotificationTypeReplyToGroupTopicReply         NotificationType = 2  // 在小组话题收到回复
	NotificationTypeSubjectTopicReply              NotificationType = 3  // 发起的条目讨论有新回复
	NotificationTypeReplyToSubjectTopicReply       NotificationType = 4  // 在条目讨论收到回复
	NotificationTypeCharacterMessage               NotificationType = 5  // 关注的角色讨论有新回复
	NotificationTypeReplyToCharacterMessage        NotificationType = 6  // 在角色讨论收到回复
	NotificationTypeBlogMessage                    NotificationType = 7  // 日志留言
	NotificationTypeReplyToBlogMessage             NotificationType = 8  // 日志留言的回复
	NotificationTypeEpisodeTopicReply              NotificationType = 9  // 章节讨论有新回复
	NotificationTypeReplyToEpisodeTopic            NotificationType = 10 // 在章节讨论收到回复
	NotificationTypeIndexMessage                   NotificationType = 11 // 目录有新留言
	NotificationTypeReplyToIndexMessage            NotificationType = 12 // 目录留言收到回复
	NotificationTypeReplyToPersonMessage           NotificationType = 13 // 人物留言收到回复
	NotificationTypeFriendRequest                  NotificationType = 14 // 收到好友申请
	NotificationTypePassFriendRequest              NotificationType = 15 // 好友申请通过
	NotificationTypeDoujinClubTopicReply           NotificationType = 17 //    同人社团讨论有新回复
	NotificationTypeReplyToDoujinClubTopicReply    NotificationType = 18 //    在同人社团讨论收到回复
	NotificationTypeReplyToDoujinSubjectTopicReply NotificationType = 19 //    同人作品讨论有新回复
	NotificationTypeDoujinEventTopicReply          NotificationType = 20 //    同人展会讨论有新回复
	NotificationTypeReplyToDoujinEventTopicReply   NotificationType = 21 //    在同人展会讨论收到回复
	NotificationTypeTsukkomiReply                  NotificationType = 22 //    吐槽有新回复
	NotificationTypeGroupTopicMention              NotificationType = 23 //    在小组讨论中被提及
	NotificationTypeSubjectTopicMention            NotificationType = 24 //    在条目讨论中被提及
	NotificationTypeCharacterMessageMention        NotificationType = 25 //    在角色留言中被提及
	NotificationTypePersonMessageMention           NotificationType = 26 //    在人物留言中被提及
	NotificationTypeIndexMessageMention            NotificationType = 27 //    在目录留言中被提及
	NotificationTypeTukkomiMention                 NotificationType = 28 //    在吐槽中被提及
	NotificationTypeBlogMessageMention             NotificationType = 29 //    在日志留言中被提及
	NotificationTypeEpisodeTopicMention            NotificationType = 30 //    在章节讨论中被提及
	NotificationTypeDoujinClubMessageMention       NotificationType = 31 //    在同人社团留言中被提及
	NotificationTypeDoujinClubTopicMention         NotificationType = 32 //    在同人社团讨论中被提及
	NotificationTypeDoujinSubjectMessageMention    NotificationType = 33 //    在同人作品留言中被提及
	NotificationTypeDoujinEventTopicMention        NotificationType = 34 //    在同人展会讨论中被提及
)

type Person

type Person struct {
	Name           string
	Image          string
	Infobox        string
	Summary        string
	ID             PersonID
	Redirect       PersonID
	CollectCount   uint32
	CommentCount   uint32
	FieldBirthYear uint16
	Producer       bool
	Mangaka        bool
	Type           uint8
	Artist         bool
	Seiyu          bool
	Writer         bool
	Illustrator    bool
	Actor          bool
	FieldBloodType uint8
	FieldGender    uint8
	FieldBirthMon  uint8
	Locked         bool
	FieldBirthDay  uint8
}

func (Person) Careers

func (p Person) Careers() []string

type PersonCharacterRelation

type PersonCharacterRelation struct {
	Character Character
	Person    Person
	Subject   Subject
}

type PersonID added in v0.20.2

type PersonID uint32

func (PersonID) Value added in v0.20.2

func (v PersonID) Value() (driver.Value, error)

type PersonRevision added in v0.16.9

type PersonRevision struct {
	Data PersonRevisionData
	RevisionCommon
}

type PersonRevisionData added in v0.16.9

type PersonRevisionData map[string]PersonRevisionDataItem

type PersonRevisionDataItem

type PersonRevisionDataItem struct {
	Name       string     `json:"name" mapstructure:"prsn_name"`
	InfoBox    string     `json:"infobox" mapstructure:"prsn_infobox"`
	Summary    string     `json:"summary" mapstructure:"prsn_summary"`
	Profession Profession `json:"profession"`
	Extra      Extra      `json:"extra"`
}

type Platform

type Platform struct {
	Alias        string `json:"alias"`
	Type         string `json:"type"`
	TypeCN       string `json:"type_cn"`
	WikiTpl      string `json:"wiki_tpl"`
	SearchString string `json:"search_string"`
	ID           int    `json:"id"`
	EnableHeader bool   `json:"enable_header"`
}

func (Platform) String

func (p Platform) String() string

type PrivateMessage added in v0.29.0

type PrivateMessage struct {
	CreatedTime       time.Time
	Title             string
	Content           string
	Folder            PrivateMessageFolderType
	SenderID          UserID
	ReceiverID        UserID
	ID                PrivateMessageID
	MainMessageID     PrivateMessageID // 如果当前是首条私信,则为当前私信的id,否则为0
	RelatedMessageID  PrivateMessageID // 首条私信的id
	New               bool
	DeletedBySender   bool
	DeletedByReceiver bool
}

type PrivateMessageFolderType added in v0.29.0

type PrivateMessageFolderType string
const (
	PrivateMessageFolderTypeInbox  PrivateMessageFolderType = "inbox"
	PrivateMessageFolderTypeOutbox PrivateMessageFolderType = "outbox"
)

type PrivateMessageID added in v0.29.0

type PrivateMessageID uint32

func (PrivateMessageID) Value added in v0.29.0

func (v PrivateMessageID) Value() (driver.Value, error)

type PrivateMessageListItem added in v0.29.0

type PrivateMessageListItem struct {
	Main PrivateMessage
	Self PrivateMessage
}

type PrivateMessageTypeCounts added in v0.29.0

type PrivateMessageTypeCounts struct {
	Unread int64
	Inbox  int64
	Outbox int64
}

type Profession

type Profession struct {
	Writer      string `json:"writer,omitempty"`
	Producer    string `json:"producer,omitempty"`
	Mangaka     string `json:"mangaka,omitempty"`
	Artist      string `json:"artist,omitempty"`
	Seiyu       string `json:"seiyu,omitempty"`
	Illustrator string `json:"illustrator,omitempty"`
	Actor       string `json:"actor,omitempty"`
}

type Rating

type Rating struct {
	Rank  uint32
	Total uint32
	Count Count
	Score float64
}

type RevisionCommon

type RevisionCommon struct {
	CreatedAt time.Time
	Summary   string
	ID        RevisionID
	CreatorID UserID
	Type      uint8
}

RevisionCommon common parts in revision.

type RevisionID added in v0.20.2

type RevisionID = uint32

type RevisionType added in v0.20.2

type RevisionType = uint8

type SubComment added in v0.22.0

type SubComment struct {
	CreatedAt time.Time
	Content   string
	CreatorID UserID
	Related   CommentID
	State     CommentState
	ID        CommentID
	ObjectID  TopicID
}

type Subject

type Subject struct {
	Image         string
	Summary       string
	Name          string
	Date          string // first release date
	NameCN        string
	Infobox       string
	CompatRawTags []byte // compat field for old tags
	Tags          []Tag
	OnHold        uint32
	Dropped       uint32
	Series        bool
	Volumes       uint32
	Eps           uint32
	Wish          uint32
	Collect       uint32
	Doing         uint32
	ID            SubjectID
	PlatformID    uint16
	TypeID        SubjectType
	Ban           uint8
	Airtime       uint8 // air weekday, start from
	NSFW          bool
	Rating        Rating
	Redirect      SubjectID
}

func (Subject) GetID added in v0.27.6

func (s Subject) GetID() SubjectID

func (Subject) Locked

func (s Subject) Locked() bool

type SubjectCharacterRelation

type SubjectCharacterRelation struct {
	Character Character
	Subject   Subject
	TypeID    uint8
}

type SubjectCollection added in v0.20.9

type SubjectCollection uint8
const (
	SubjectCollectionAll     SubjectCollection = 0 // 全部
	SubjectCollectionWish    SubjectCollection = 1 // 想看
	SubjectCollectionDone    SubjectCollection = 2 // 看过
	SubjectCollectionDoing   SubjectCollection = 3 // 在看
	SubjectCollectionOnHold  SubjectCollection = 4 // 搁置
	SubjectCollectionDropped SubjectCollection = 5 // 抛弃
)

func (*SubjectCollection) UnmarshalJSON added in v0.27.0

func (s *SubjectCollection) UnmarshalJSON(bytes []byte) error

type SubjectID added in v0.20.2

type SubjectID uint32

func (SubjectID) Value added in v0.20.2

func (v SubjectID) Value() (driver.Value, error)

func (SubjectID) Zap added in v0.27.0

func (v SubjectID) Zap() zap.Field

type SubjectInternalRelation

type SubjectInternalRelation struct {
	Source      Subject
	Destination Subject
	TypeID      uint16
}

type SubjectPersonRelation

type SubjectPersonRelation struct {
	Person  Person
	Subject Subject
	TypeID  uint16
}

type SubjectRevision added in v0.16.9

type SubjectRevision struct {
	Data *SubjectRevisionData
	RevisionCommon
}

type SubjectRevisionData

type SubjectRevisionData struct {
	Name         string
	NameCN       string
	VoteField    string
	FieldInfobox string
	FieldSummary string
	Platform     uint16
	TypeID       uint16
	SubjectID    SubjectID
	FieldEps     uint32
	Type         uint8
}

type SubjectType

type SubjectType = uint8
const (
	SubjectTypeAll   SubjectType = 0
	SubjectTypeBook  SubjectType = 1 // 书籍
	SubjectTypeAnime SubjectType = 2 // 动画
	SubjectTypeMusic SubjectType = 3 // 音乐
	SubjectTypeGame  SubjectType = 4 // 游戏
	SubjectTypeReal  SubjectType = 6 // 三次元
)

type Tag added in v0.21.1

type Tag struct {
	Name  string
	Count int
}

type TimeLine added in v0.25.7

type TimeLine struct {
	*TimeLineMeta

	*TimeLineMemo
	TimeLineImages
}

type TimeLineBlogMemo added in v0.25.7

type TimeLineBlogMemo struct {
	EntryTitle       string
	EntryDescription string
	EntryID          int
}

type TimeLineCat added in v0.25.7

type TimeLineCat = uint16
const (
	TimeLineCatRelation TimeLineCat = 1
	TimeLineCatGroup    TimeLineCat = 1
	TimeLineCatWiki     TimeLineCat = 2
	TimeLineCatSubject  TimeLineCat = 3
	TimeLineCatProgress TimeLineCat = 4
	TimeLineCatSay      TimeLineCat = 5
	TimeLineCatBlog     TimeLineCat = 6
	TimeLineCatIndex    TimeLineCat = 7
	TimeLineCatMono     TimeLineCat = 8
	TimeLineCatDoujin   TimeLineCat = 9
)

type TimeLineDoujinMemo added in v0.25.7

type TimeLineDoujinMemo struct {
	ID    string
	Name  string
	Title string
}

type TimeLineGroupMemo added in v0.25.7

type TimeLineGroupMemo struct {
	ID    string
	Name  string
	Title string
	Desc  string
}

type TimeLineID added in v0.25.7

type TimeLineID uint32

func (TimeLineID) Value added in v0.25.7

func (v TimeLineID) Value() (driver.Value, error)

type TimeLineImage added in v0.25.7

type TimeLineImage struct {
	Cat       *int64
	GroupID   *string
	GroupName *string
	Name      *string
	Title     *string
	ID        *int
	UserID    *string
	SubjectID *string
	Images    *string
}

type TimeLineImages added in v0.25.7

type TimeLineImages []TimeLineImage

type TimeLineIndexMemo added in v0.25.7

type TimeLineIndexMemo struct {
	ID          string
	Title       string
	Description string
}

type TimeLineMemo added in v0.25.7

type TimeLineMemo struct {
	Cat  TimeLineCat // Category
	Type uint16

	Content *TimeLineMemoContent
}

type TimeLineMeta added in v0.25.7

type TimeLineMeta struct {
	ID  TimeLineID
	UID UserID

	Related  string
	Batch    uint8
	Source   uint8
	Replies  uint32
	Dateline uint32
}

type TimeLineMonoMemo added in v0.25.7

type TimeLineMonoMemo struct {
	Name string `php:"name"`
	Cat  int    `php:"cat"`
	ID   int    `php:"id"`
}

type TimeLineProgressMemo added in v0.25.7

type TimeLineProgressMemo struct {
	EpName        *string
	VolsTotal     *string
	SubjectName   *string
	EpsUpdate     *int
	VolsUpdate    *int
	EpsTotal      *int
	EpSort        *int
	EpID          *EpisodeID
	SubjectID     *SubjectID
	SubjectTypeID *SubjectType
}

type TimeLineRelationMemo added in v0.25.7

type TimeLineRelationMemo struct {
	UserID   string
	Username string
	Nickname string
}

type TimeLineSay added in v0.25.7

type TimeLineSay string

type TimeLineSayEdit added in v0.25.7

type TimeLineSayEdit struct {
	Before string
	After  string
}

type TimeLineSayMemo added in v0.25.7

type TimeLineSayMemo struct {
	*TimeLineSay
	*TimeLineSayEdit
}

type TimeLineSubjectMemo added in v0.25.7

type TimeLineSubjectMemo struct {
	ID             string
	TypeID         string
	Name           string
	NameCN         string
	Series         string
	CollectComment string
	CollectRate    int
}

type TimeLineWikiMemo added in v0.25.7

type TimeLineWikiMemo struct {
	SubjectName   string
	SubjectNameCN string
	SubjectID     int
}

type Topic added in v0.22.0

type Topic struct {
	CreatedAt time.Time
	UpdatedAt time.Time
	Title     string
	ID        TopicID
	CreatorID UserID
	Replies   uint32
	ParentID  uint32
	State     CommentState
	Display   TopicDisplay
}

type TopicDetail added in v0.23.2

type TopicDetail struct {
	Content string
	Replies []Comment
	Topic
}

type TopicDisplay added in v0.25.9

type TopicDisplay uint8
const (
	TopicDisplayBan    TopicDisplay = 0 // 软删除
	TopicDisplayNormal TopicDisplay = 1
	TopicDisplayReview TopicDisplay = 2
)

type TopicID added in v0.22.0

type TopicID uint32

func (TopicID) Zap added in v0.27.1

func (v TopicID) Zap() zap.Field

type User

type User struct {
	RegistrationTime time.Time
	NickName         string
	Avatar           string
	Sign             string
	UserName         string
	ID               UserID
	UserGroup        UserGroupID
}

User is visible for everyone.

func (User) GetID added in v0.27.6

func (u User) GetID() UserID

type UserEpisodeCollection added in v0.23.0

type UserEpisodeCollection struct {
	ID   EpisodeID
	Type EpisodeCollection
}

type UserFields added in v0.29.0

type UserFields struct {
	Site      string
	Location  string
	Bio       string
	Blocklist []UserID
	Privacy   UserPrivacySettings
	UID       UserID
}

type UserGroupID added in v0.20.2

type UserGroupID = uint8

type UserID added in v0.20.2

type UserID uint32

func (UserID) Value added in v0.20.2

func (v UserID) Value() (driver.Value, error)

func (UserID) Zap added in v0.27.0

func (v UserID) Zap() zap.Field

type UserPrivacySettings added in v0.29.0

type UserPrivacySettings struct {
	ReceivePrivateMessage      UserReceiveFilter
	ReceiveTimelineReply       UserReceiveFilter
	ReceiveMentionNotification UserReceiveFilter
	ReceiveCommentNotification UserReceiveFilter
}

func (*UserPrivacySettings) Unmarshal added in v0.29.0

func (settings *UserPrivacySettings) Unmarshal(s []byte)

type UserPrivacySettingsField added in v0.29.0

type UserPrivacySettingsField int
const (
	UserPrivacyReceivePrivateMessage      UserPrivacySettingsField = 1
	UserPrivacyReceiveTimelineReply       UserPrivacySettingsField = 30
	UserPrivacyReceiveMentionNotification UserPrivacySettingsField = 20
	UserPrivacyReceiveCommentNotification UserPrivacySettingsField = 21
)

type UserReceiveFilter added in v0.29.0

type UserReceiveFilter uint8
const (
	UserReceiveFilterAll UserReceiveFilter = iota
	UserReceiveFilterFriends
	UserReceiveFilterNone
)

type UserSubjectCollection added in v0.22.5

type UserSubjectCollection struct {
	UpdatedAt   time.Time
	Comment     string
	Tags        []string
	VolStatus   uint32
	EpStatus    uint32
	SubjectID   SubjectID
	SubjectType uint8
	Rate        uint8
	Type        SubjectCollection
	Private     bool
}

type UserSubjectEpisodesCollection added in v0.23.0

type UserSubjectEpisodesCollection map[EpisodeID]UserEpisodeCollection

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL