mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-16 20:12:26 +08:00
init commit
This commit is contained in:
13
water/entity/access_token_entity.go
Normal file
13
water/entity/access_token_entity.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package entity
|
||||
|
||||
type AccessToken struct {
|
||||
Atid uint64 `gorm:"column:atid;primary_key;auto_increment"`
|
||||
Uid uint64 `gorm:"column:uid"`
|
||||
Username string `gorm:"column:username"`
|
||||
AccessToken string `gorm:"column:access_token"`
|
||||
CreateTime string `gorm:"column:create_time"`
|
||||
}
|
||||
|
||||
func (AccessToken) TableName() string {
|
||||
return "access_token"
|
||||
}
|
||||
6
water/entity/login_entity.go
Normal file
6
water/entity/login_entity.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package entity
|
||||
|
||||
type Login struct {
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
5
water/entity/memory_token_entity.go
Normal file
5
water/entity/memory_token_entity.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package entity
|
||||
|
||||
type MemoryToken struct {
|
||||
Token string `json:"token"`
|
||||
}
|
||||
13
water/entity/refresh_token_entity.go
Normal file
13
water/entity/refresh_token_entity.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package entity
|
||||
|
||||
type RefreshToken struct {
|
||||
Rtid uint64 `gorm:"column:rtid;primary_key;auto_increment"`
|
||||
Uid uint64 `gorm:"column:uid"`
|
||||
Username string `gorm:"column:username"`
|
||||
RefreshToken string `gorm:"column:refresh_token"`
|
||||
CreateTime string `gorm:"column:create_time"`
|
||||
}
|
||||
|
||||
func (RefreshToken) TableName() string {
|
||||
return "refresh_token"
|
||||
}
|
||||
Reference in New Issue
Block a user