I am batman
This commit is contained in:
23
services/auth-service/internal/models/models.go
Normal file
23
services/auth-service/internal/models/models.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Auth struct {
|
||||
gorm.Model
|
||||
Username string `gorm:"uniqueIndex;not null"`
|
||||
Email string `gorm:"uniqueIndex;not null"`
|
||||
Password string `gorm:"not null"`
|
||||
VerificationToken string `json:"-"`
|
||||
ResetToken string `json:"-"`
|
||||
ResetTokenExpiry time.Time `json:"-"`
|
||||
Role string `gorm:"type:varchar(50);default:user" json:"role,omitempty"`
|
||||
}
|
||||
|
||||
type Test struct {
|
||||
gorm.Model
|
||||
Content string `gorm:"type:text;not null"`
|
||||
}
|
||||
Reference in New Issue
Block a user