mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-10 15:22:56 +03:00
Co-authored-by: Kyle Mendell <kmendell@outlook.com> Co-authored-by: Elias Schneider <login@eliasschneider.com>
41 lines
1.3 KiB
Go
41 lines
1.3 KiB
Go
package dto
|
|
|
|
import "time"
|
|
|
|
type UserDto struct {
|
|
ID string `json:"id"`
|
|
Username string `json:"username"`
|
|
Email string `json:"email" `
|
|
FirstName string `json:"firstName"`
|
|
LastName string `json:"lastName"`
|
|
IsAdmin bool `json:"isAdmin"`
|
|
Locale *string `json:"locale"`
|
|
CustomClaims []CustomClaimDto `json:"customClaims"`
|
|
UserGroups []UserGroupDto `json:"userGroups"`
|
|
LdapID *string `json:"ldapId"`
|
|
}
|
|
|
|
type UserCreateDto struct {
|
|
Username string `json:"username" binding:"required,username,min=2,max=50"`
|
|
Email string `json:"email" binding:"required,email"`
|
|
FirstName string `json:"firstName" binding:"required,min=1,max=50"`
|
|
LastName string `json:"lastName" binding:"required,min=1,max=50"`
|
|
IsAdmin bool `json:"isAdmin"`
|
|
Locale *string `json:"locale"`
|
|
LdapID string `json:"-"`
|
|
}
|
|
|
|
type OneTimeAccessTokenCreateDto struct {
|
|
UserID string `json:"userId"`
|
|
ExpiresAt time.Time `json:"expiresAt" binding:"required"`
|
|
}
|
|
|
|
type OneTimeAccessEmailDto struct {
|
|
Email string `json:"email" binding:"required,email"`
|
|
RedirectPath string `json:"redirectPath"`
|
|
}
|
|
|
|
type UserUpdateUserGroupDto struct {
|
|
UserGroupIds []string `json:"userGroupIds" binding:"required"`
|
|
}
|