Files
token-go/model/qrcode.go
2023-10-21 16:54:09 +08:00

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}
}