add models and jwt
This commit is contained in:
19
pkg/util/uuid.go
Normal file
19
pkg/util/uuid.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
var t = time.Unix(1594909810, 0)
|
||||
|
||||
var flake = NewSonyflake(Settings{
|
||||
|
||||
})
|
||||
|
||||
func GenSonyFlakeId() uint64 {
|
||||
uuid, err := flake.NextID()
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
return uuid
|
||||
}
|
||||
Reference in New Issue
Block a user