mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Add db support for workspaces
This commit is contained in:
17
backend/internal/models/user.go
Normal file
17
backend/internal/models/user.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
ID int `json:"id" validate:"required,min=1"`
|
||||
Username string `json:"username" validate:"required"`
|
||||
Email string `json:"email" validate:"required,email"`
|
||||
PasswordHash string `json:"-"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
}
|
||||
|
||||
func (u *User) Validate() error {
|
||||
return validate.Struct(u)
|
||||
}
|
||||
Reference in New Issue
Block a user