fix NewDefaultFieldRule

This commit is contained in:
白茶清欢 2024-11-25 14:35:00 +08:00
parent 0ece3237d7
commit bc555966fa

View File

@ -7,14 +7,17 @@
// Date : 2024-04-29 12:18 // Date : 2024-04-29 12:18
package validator package validator
import "git.zhangdeman.cn/gateway/validator/define" import (
"git.zhangdeman.cn/gateway/validator/define"
"git.zhangdeman.cn/zhangdeman/consts/enums"
)
// NewDefaultFieldRule ... // NewDefaultFieldRule ...
// //
// Author : go_developer@163.com<白茶清欢> // Author : go_developer@163.com<白茶清欢>
// //
// Date : 14:01 2024/4/29 // Date : 14:01 2024/4/29
func NewDefaultFieldRule(path string, dataType string, isRequired bool, defaultValue string) *define.FieldRule { func NewDefaultFieldRule(path string, dataType enums.DataType, isRequired bool, defaultValue string) *define.FieldRule {
r := &define.FieldRule{ r := &define.FieldRule{
Path: path, Path: path,
Type: dataType, Type: dataType,