Initial commit: web_hghl_server

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 16:28:14 +08:00
co-authored by Claude Opus 4.7
commit 65fca60622
653 changed files with 135901 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
package pubdef
// CommentObjectType 评论对象类型
type CommentObjectType int64
const (
CommentObjectTypeVideo CommentObjectType = 0 // 视频
CommentObjectTypePlaylet CommentObjectType = 4 // 短剧
CommentObjectTypePlayletChapter CommentObjectType = 11 // 短剧剧集
)
var commentObjectTypeNameMap = map[CommentObjectType]string{
CommentObjectTypeVideo: "视频",
CommentObjectTypePlaylet: "短剧",
CommentObjectTypePlayletChapter: "短剧剧集",
}
// CommentObjectTypeName 返回对象类型对应的展示名称
func CommentObjectTypeName(objectType CommentObjectType) string {
return commentObjectTypeNameMap[objectType]
}
// ValidCommentObjectType 判断评论对象类型是否合法
func ValidCommentObjectType(objectType CommentObjectType) bool {
_, ok := commentObjectTypeNameMap[objectType]
return ok
}