init commit

This commit is contained in:
flswld
2022-11-20 15:38:00 +08:00
parent eda2b643b9
commit 3efed3defe
5834 changed files with 636508 additions and 0 deletions

View 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"`
}

View 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"
}