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
package validator
import "git.zhangdeman.cn/gateway/validator/define"
import (
"git.zhangdeman.cn/gateway/validator/define"
"git.zhangdeman.cn/zhangdeman/consts/enums"
)
// NewDefaultFieldRule ...
//
// Author : go_developer@163.com<白茶清欢>
//
// 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{
Path: path,
Type: dataType,