[🚀] v0.12.23

This commit is contained in:
BvBeJ 2025-03-04 17:12:57 +08:00
parent 1ef1a68948
commit 568843f71c
2 changed files with 18 additions and 6 deletions

View File

@ -60,3 +60,12 @@ func (e Email) MarshalJSON() ([]byte, error) {
v := fmt.Sprintf("%s***%s", split[0][:1], split[0][len(split[0])-1:])
return []byte(`"` + v + "@" + split[1] + `"`), nil
}
func (usc UnifiedSocialCreditCode) MarshalJSON() ([]byte, error) {
if len(usc) != 18 {
return []byte(`"` + usc + `"`), nil
}
v := fmt.Sprintf("%s**********%s", usc[:4], usc[14:])
return []byte(`"` + v + `"`), nil
}

View File

@ -1,19 +1,22 @@
package ddm
// 手机号 132****7986
// Mobile 手机号 132****7986
type Mobile string
// 银行卡号 622888******5676
// BankCard 银行卡号 622888******5676
type BankCard string
// 身份证号 1******7
// IDCard 身份证号 1******7
type IDCard string
// 姓名 *鸿章
// IDName 姓名 *鸿章
type IDName string
// 密码 ******
// PassWord 密码 ******
type PassWord string
// 邮箱 l***w@gmail.com
// Email 邮箱 l***w@gmail.com
type Email string
// UnifiedSocialCreditCode 统一社会信用代码 9137****73X
type UnifiedSocialCreditCode string