add: db user type + gorm deps
This commit is contained in:
parent
69e3133563
commit
fe1ebcd711
3 changed files with 86 additions and 0 deletions
|
@ -1,7 +1,10 @@
|
|||
package types
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Route struct {
|
||||
|
@ -15,6 +18,15 @@ type StereoConfig struct {
|
|||
ImagePath string
|
||||
}
|
||||
|
||||
type User struct {
|
||||
gorm.Model
|
||||
ID uint
|
||||
Username string
|
||||
RegistrationDate time.Time
|
||||
Blacklisted bool
|
||||
Email string
|
||||
}
|
||||
|
||||
func RegisterRoutes(groupName string, routes []Route, cfg *StereoConfig) {
|
||||
group := cfg.Router.Group(groupName)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue