优化枚举值定义

This commit is contained in:
2024-11-25 14:51:14 +08:00
parent 325efde765
commit f919222003
4 changed files with 146 additions and 120 deletions

View File

@ -6,33 +6,3 @@
//
// Date : 2024-11-25 14:39
package enums
// RequestDataLocation 请求数据所在位置
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 14:40 2024/11/25
type RequestDataLocation string
func (rdl RequestDataLocation) String() string {
return string(rdl)
}
func (rdl RequestDataLocation) MarshalJSON() ([]byte, error) {
return []byte(rdl.String()), nil
}
// ResponseDataLocation 响应数据所在位置
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 14:41 2024/11/25
type ResponseDataLocation string
func (rdl ResponseDataLocation) String() string {
return string(rdl)
}
func (rdl ResponseDataLocation) MarshalJSON() ([]byte, error) {
return []byte(rdl.String()), nil
}

View File

@ -6,18 +6,3 @@
//
// Date : 2024-11-25 14:08
package enums
// DataType 数据类型枚举值
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 14:10 2024/11/25
type DataType string
func (df DataType) String() string {
return string(df)
}
func (df DataType) MarshalJSON() ([]byte, error) {
return []byte(df.String()), nil
}