54
server/model/app/request/regex_script.go
Normal file
54
server/model/app/request/regex_script.go
Normal file
@@ -0,0 +1,54 @@
|
||||
package request
|
||||
|
||||
// CreateRegexScriptRequest 创建正则脚本请求
|
||||
type CreateRegexScriptRequest struct {
|
||||
Name string `json:"name" binding:"required,max=100"`
|
||||
FindRegex string `json:"findRegex" binding:"required"`
|
||||
ReplaceWith string `json:"replaceWith"`
|
||||
TrimStrings []string `json:"trimStrings"`
|
||||
Placement int `json:"placement"`
|
||||
Disabled bool `json:"disabled"`
|
||||
MarkdownOnly bool `json:"markdownOnly"`
|
||||
RunOnEdit bool `json:"runOnEdit"`
|
||||
PromptOnly bool `json:"promptOnly"`
|
||||
SubstituteRegex bool `json:"substituteRegex"`
|
||||
MinDepth *int `json:"minDepth"`
|
||||
MaxDepth *int `json:"maxDepth"`
|
||||
Scope int `json:"scope"`
|
||||
OwnerCharID *uint `json:"ownerCharId"`
|
||||
OwnerPresetID *uint `json:"ownerPresetId"`
|
||||
Order int `json:"order"`
|
||||
}
|
||||
|
||||
// UpdateRegexScriptRequest 更新正则脚本请求
|
||||
type UpdateRegexScriptRequest struct {
|
||||
Name *string `json:"name" binding:"omitempty,max=100"`
|
||||
FindRegex *string `json:"findRegex"`
|
||||
ReplaceWith *string `json:"replaceWith"`
|
||||
TrimStrings []string `json:"trimStrings"`
|
||||
Placement *int `json:"placement"`
|
||||
Disabled *bool `json:"disabled"`
|
||||
MarkdownOnly *bool `json:"markdownOnly"`
|
||||
RunOnEdit *bool `json:"runOnEdit"`
|
||||
PromptOnly *bool `json:"promptOnly"`
|
||||
SubstituteRegex *bool `json:"substituteRegex"`
|
||||
MinDepth *int `json:"minDepth"`
|
||||
MaxDepth *int `json:"maxDepth"`
|
||||
Scope *int `json:"scope"`
|
||||
OwnerCharID *uint `json:"ownerCharId"`
|
||||
OwnerPresetID *uint `json:"ownerPresetId"`
|
||||
Order *int `json:"order"`
|
||||
}
|
||||
|
||||
// GetRegexScriptListRequest 获取正则脚本列表请求
|
||||
type GetRegexScriptListRequest struct {
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"pageSize"`
|
||||
Keyword string `json:"keyword"`
|
||||
Scope *int `json:"scope"`
|
||||
}
|
||||
|
||||
// TestRegexScriptRequest 测试正则脚本请求
|
||||
type TestRegexScriptRequest struct {
|
||||
TestString string `json:"testString" binding:"required"`
|
||||
}
|
||||
Reference in New Issue
Block a user