mirror of
https://github.com/weloe/token-go.git
synced 2025-10-05 23:46:52 +08:00
24 lines
381 B
Go
24 lines
381 B
Go
package model
|
|
|
|
type QRCodeState int
|
|
|
|
// QRCode State
|
|
const (
|
|
WaitScan QRCodeState = 1
|
|
WaitAuth QRCodeState = 2
|
|
ConfirmAuth QRCodeState = 3
|
|
CancelAuth QRCodeState = 4
|
|
Expired QRCodeState = 5
|
|
)
|
|
|
|
type QRCode struct {
|
|
Id string
|
|
State QRCodeState
|
|
LoginId string
|
|
Ticket string
|
|
}
|
|
|
|
func NewQRCode(id string) *QRCode {
|
|
return &QRCode{Id: id, State: WaitScan}
|
|
}
|