68 lines
1.4 KiB
Go
68 lines
1.4 KiB
Go
package enums
|
|
|
|
type DocPageStatus string
|
|
|
|
const (
|
|
DocPageStatusDraft DocPageStatus = "draft"
|
|
DocPageStatusPublished DocPageStatus = "published"
|
|
DocPageStatusHidden DocPageStatus = "hidden"
|
|
DocPageStatusDeleted DocPageStatus = "deleted"
|
|
)
|
|
|
|
type PostStatus string
|
|
|
|
const (
|
|
PostStatusPending PostStatus = "pending"
|
|
PostStatusNormal PostStatus = "normal"
|
|
PostStatusResolved PostStatus = "resolved"
|
|
PostStatusClosed PostStatus = "closed"
|
|
PostStatusHidden PostStatus = "hidden"
|
|
PostStatusDeleted PostStatus = "deleted"
|
|
)
|
|
|
|
type CommentStatus string
|
|
|
|
const (
|
|
CommentStatusNormal CommentStatus = "normal"
|
|
CommentStatusHidden CommentStatus = "hidden"
|
|
CommentStatusDeleted CommentStatus = "deleted"
|
|
)
|
|
|
|
type CommentAuthorType string
|
|
|
|
const (
|
|
CommentAuthorTypeUser CommentAuthorType = "user"
|
|
CommentAuthorTypeEmployee CommentAuthorType = "employee"
|
|
)
|
|
|
|
type ReactionTarget string
|
|
|
|
const (
|
|
ReactionTargetPost ReactionTarget = "post"
|
|
ReactionTargetComment ReactionTarget = "comment"
|
|
)
|
|
|
|
type ReactionType string
|
|
|
|
const (
|
|
ReactionTypeLike ReactionType = "like"
|
|
)
|
|
|
|
type UserType string
|
|
|
|
const (
|
|
UserTypeUser UserType = "user"
|
|
UserTypeEmployee UserType = "employee"
|
|
)
|
|
|
|
var UserTypeValues = []UserType{UserTypeUser, UserTypeEmployee}
|
|
|
|
var userTypeLabelMap = map[UserType]string{
|
|
UserTypeUser: "访客",
|
|
UserTypeEmployee: "员工",
|
|
}
|
|
|
|
func GetUserTypeLabel(userType UserType) string {
|
|
return userTypeLabelMap[userType]
|
|
}
|