优化发货接口对接流程
This commit is contained in:
@@ -289,6 +289,19 @@ type APIRequestNonce struct {
|
||||
ExpiresAt time.Time `gorm:"not null;index" json:"expires_at"`
|
||||
}
|
||||
|
||||
// SourceAPINonce 记录源头接口的请求 nonce,保证重放保护跨进程、跨重启生效。
|
||||
type SourceAPINonce struct {
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
APIKey string `gorm:"size:96;not null;uniqueIndex:idx_source_api_nonce" json:"-"`
|
||||
Nonce string `gorm:"size:64;not null;uniqueIndex:idx_source_api_nonce" json:"-"`
|
||||
ExpiresAt time.Time `gorm:"not null;index" json:"-"`
|
||||
}
|
||||
|
||||
func (SourceAPINonce) TableName() string {
|
||||
return "source_api_nonces"
|
||||
}
|
||||
|
||||
// AuditLog 留存后台和开放接口的重要业务操作。
|
||||
type AuditLog struct {
|
||||
ID uint `gorm:"primarykey" json:"id"`
|
||||
|
||||
Reference in New Issue
Block a user