package request // CreateWorldbookRequest 创建世界书请求 type CreateWorldbookRequest struct { Name string `json:"name" binding:"required,max=100"` Description string `json:"description"` IsPublic bool `json:"isPublic"` } // UpdateWorldbookRequest 更新世界书请求 type UpdateWorldbookRequest struct { Name *string `json:"name" binding:"omitempty,max=100"` Description *string `json:"description"` IsPublic *bool `json:"isPublic"` } // GetWorldbookListRequest 获取世界书列表请求 type GetWorldbookListRequest struct { Page int `json:"page"` PageSize int `json:"pageSize"` Keyword string `json:"keyword"` } // CreateEntryRequest 创建世界书条目请求 type CreateEntryRequest struct { Comment string `json:"comment"` Content string `json:"content" binding:"required"` Keys []string `json:"keys"` SecondaryKeys []string `json:"secondaryKeys"` Constant bool `json:"constant"` Enabled *bool `json:"enabled"` // 指针以区分 false 和未传 UseRegex bool `json:"useRegex"` CaseSensitive bool `json:"caseSensitive"` MatchWholeWords bool `json:"matchWholeWords"` Selective bool `json:"selective"` SelectiveLogic int `json:"selectiveLogic"` Position int `json:"position"` Depth int `json:"depth"` Order int `json:"order"` Probability int `json:"probability"` ScanDepth int `json:"scanDepth"` GroupID string `json:"groupId"` } // UpdateEntryRequest 更新世界书条目请求(所有字段可选) type UpdateEntryRequest struct { Comment *string `json:"comment"` Content *string `json:"content"` Keys []string `json:"keys"` SecondaryKeys []string `json:"secondaryKeys"` Constant *bool `json:"constant"` Enabled *bool `json:"enabled"` UseRegex *bool `json:"useRegex"` CaseSensitive *bool `json:"caseSensitive"` MatchWholeWords *bool `json:"matchWholeWords"` Selective *bool `json:"selective"` SelectiveLogic *int `json:"selectiveLogic"` Position *int `json:"position"` Depth *int `json:"depth"` Order *int `json:"order"` Probability *int `json:"probability"` ScanDepth *int `json:"scanDepth"` GroupID *string `json:"groupId"` }