feat: analysis user auth and ws
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package dao
|
||||
|
||||
import "lone-services/pkg/utils"
|
||||
|
||||
type Agreement struct {
|
||||
Id int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
|
||||
TypeId int32 `gorm:"column:type_id" json:"type_id"`
|
||||
Title string `gorm:"column:title" json:"title"`
|
||||
Content string `gorm:"column:content" json:"content"`
|
||||
Status int8 `gorm:"column:status" json:"status"`
|
||||
CreatedAt utils.CustomTime `gorm:"column:created_at" json:"created_at"`
|
||||
UpdatedAt utils.CustomTime `gorm:"column:updated_at" json:"updated_at"`
|
||||
}
|
||||
|
||||
type AgreementInfo struct {
|
||||
Id int64 `json:"id"`
|
||||
TypeId int32 `json:"type_id"`
|
||||
Content string `json:"content"`
|
||||
CreatedAt utils.CustomTime `json:"created_at"`
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package dao
|
||||
|
||||
import "lone-services/pkg/utils"
|
||||
|
||||
type UserStoreAuth struct {
|
||||
Id int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
|
||||
UserId int64 `gorm:"column:user_id" json:"user_id"`
|
||||
ObjId int64 `gorm:"column:obj_id" json:"obj_id"`
|
||||
StoreId int64 `gorm:"column:store_id" json:"store_id"`
|
||||
ValidityTime utils.CustomTime `gorm:"column:validity_time" json:"validity_time"`
|
||||
Status uint8 `gorm:"column:status" json:"status"`
|
||||
IP string `gorm:"column:ip" json:"ip"`
|
||||
CreateTime utils.CustomTime `gorm:"column:create_time" json:"create_time"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package dao
|
||||
|
||||
const (
|
||||
TypeSale uint8 = 1
|
||||
TypeStore uint8 = 2
|
||||
TypeUser uint8 = 3
|
||||
|
||||
ClientCodeUserSkin = "user_skin"
|
||||
|
||||
StatusEnabled uint8 = 1
|
||||
StatusDisabled uint8 = 2
|
||||
)
|
||||
@@ -1,17 +0,0 @@
|
||||
package dao
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
RedisKeyQRSession = "qr:session:"
|
||||
|
||||
QrcodeSessionPending = 1 // 待扫码
|
||||
QrcodeSessionScanned = 2 // 已扫码未登录
|
||||
QrcodeSessionLogined = 3 // 已扫码已登录
|
||||
|
||||
QrcodeSessionTTL = 5 * time.Minute
|
||||
)
|
||||
|
||||
type QrcodeSessionStatus struct {
|
||||
Status int `json:"status"`
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package dao
|
||||
|
||||
import "lone-services/pkg/utils"
|
||||
|
||||
type User struct {
|
||||
Id int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
|
||||
FacePath string `gorm:"column:face_path" json:"face_path"`
|
||||
IsRegistered uint8 `gorm:"column:is_registered" json:"is_registered"`
|
||||
IsFaceVerified uint8 `gorm:"column:is_face_verified" json:"is_face_verified"`
|
||||
IsProfileCompleted uint8 `gorm:"column:is_profile_completed" json:"is_profile_completed"`
|
||||
CreatedAt utils.CustomTime `gorm:"column:created_at" json:"created_at"`
|
||||
UpdatedAt utils.CustomTime `gorm:"column:updated_at" json:"updated_at"`
|
||||
}
|
||||
|
||||
type UserCreate struct {
|
||||
Id int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
|
||||
FacePath string `gorm:"column:face_path" json:"face_path"`
|
||||
IsRegistered uint8 `gorm:"column:is_registered" json:"is_registered"`
|
||||
IsFaceVerified uint8 `gorm:"column:is_face_verified" json:"is_face_verified"`
|
||||
IsProfileCompleted uint8 `gorm:"column:is_profile_completed" json:"is_profile_completed"`
|
||||
}
|
||||
Reference in New Issue
Block a user