mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 16:04:23 +00:00
20 lines
514 B
Go
20 lines
514 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type User struct {
|
|
ID int `json:"id" validate:"required,min=1"`
|
|
Email string `json:"email" validate:"required,email"`
|
|
DisplayName string `json:"displayName"`
|
|
PasswordHash string `json:"-"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
LastWorkspaceID int `json:"lastWorkspaceId"`
|
|
LastOpenedFilePath string `json:"lastOpenedFilePath"`
|
|
}
|
|
|
|
func (u *User) Validate() error {
|
|
return validate.Struct(u)
|
|
}
|