mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
init commit
This commit is contained in:
8
service/annie-user/entity/api/user_entity.go
Normal file
8
service/annie-user/entity/api/user_entity.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package api
|
||||
|
||||
type User struct {
|
||||
Uid uint64 `json:"uid"`
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
IsAdmin bool `json:"isAdmin"`
|
||||
}
|
||||
12
service/annie-user/entity/db/user_entity.go
Normal file
12
service/annie-user/entity/db/user_entity.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package db
|
||||
|
||||
type User struct {
|
||||
Uid uint64 `gorm:"column:uid;primary_key;auto_increment"`
|
||||
Username string `gorm:"column:username"`
|
||||
Password string `gorm:"column:password"`
|
||||
IsAdmin bool `gorm:"column:is_admin"`
|
||||
}
|
||||
|
||||
func (User) TableName() string {
|
||||
return "user"
|
||||
}
|
||||
Reference in New Issue
Block a user