add models and jwt

This commit is contained in:
张超
2024-01-10 16:05:15 +08:00
parent 45bc7c5140
commit 2455f0d897
19 changed files with 990 additions and 4 deletions

19
pkg/util/uuid.go Normal file
View 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
}