add sms authorization

This commit is contained in:
2025-06-03 12:24:15 +08:00
parent bebabce346
commit acd0dd5b9c
13 changed files with 252 additions and 90 deletions

View File

@@ -56,19 +56,19 @@ type (
}
Authorization struct {
Id int64 `db:"id"`
OrderId int64 `db:"order_id"`
GrantType string `db:"grant_type"` // 授权类型face人脸后续可扩展
AuthType sql.NullInt64 `db:"auth_type"` // 1本人2他人
UserId int64 `db:"user_id"`
TargetName string `db:"target_name"`
TargetIdcard string `db:"target_idcard"`
Status string `db:"status"` // 授权状态pending待授权、success已授权、expired已失效、revoked已撤销
CreateTime time.Time `db:"create_time"`
UpdateTime time.Time `db:"update_time"`
DeleteTime sql.NullTime `db:"delete_time"` // 删除时间
DelState int64 `db:"del_state"`
Version int64 `db:"version"` // 版本号
Id int64 `db:"id"`
OrderId int64 `db:"order_id"`
GrantType sql.NullString `db:"grant_type"` // 授权类型face人脸sms短信
AuthType sql.NullInt64 `db:"auth_type"` // 1本人2他人
UserId int64 `db:"user_id"`
TargetName string `db:"target_name"`
TargetIdcard string `db:"target_idcard"`
Status string `db:"status"` // 授权状态pending待授权、success已授权、expired已失效、revoked已撤销、rejected被拒绝
CreateTime time.Time `db:"create_time"`
UpdateTime time.Time `db:"update_time"`
DeleteTime sql.NullTime `db:"delete_time"` // 删除时间
DelState int64 `db:"del_state"`
Version int64 `db:"version"` // 版本号
}
)

View File

@@ -48,7 +48,8 @@ const (
)
const (
GrantTypeFace string = "face"
AuthorizationGrantTypeFace = "face"
AuthorizationGrantTypeSms = "sms"
)
const (
AuthorizationStatusPending = "pending"