MSP-1756 update user

This commit is contained in:
riabovvo committed 2023-05-22 14:03:02 +03:00
1 parent e81028722f
commit 234ea0ca38
5 files changed
+155 -195

No files matched your search

+31 -32
View File
@@ -5,15 +5,16 @@ import (
)
type User struct {
Id int64
RoleId int
RoleName string
FirstName string
LastName string
Email string
Blocked bool
UpdatedAt time.Time
CreatedAt time.Time
Id int64
Roles []int
FirstName string
LastName string
Email string
Description string
Blocked bool
LastSessionCreatedAt time.Time
UpdatedAt time.Time
CreatedAt time.Time
}
type UsersResponse struct {
@@ -28,27 +29,33 @@ type UsersRequest struct {
}
type AdminUserShort struct {
FirstName string
LastName string
Email string `valid:"required"`
Role string
FirstName string
LastName string
Email string `valid:"required"`
Role string
Roles []int
Permissions []string
}
type CreateUserRequest struct {
RoleId int
FirstName string
LastName string
Email string `valid:"required"`
Password string `valid:"required"`
Roles []int
FirstName string
LastName string
Email string `valid:"required"`
Password string `valid:"required"`
Description string
LastSessionCreatedAt time.Time
}
type UpdateUserRequest struct {
Id int64 `valid:"required"`
RoleId int
FirstName string
LastName string
Email string
Password string
Id int64 `valid:"required"`
Roles []int
FirstName string
LastName string
Email string
Description string
Blocked bool
LastSessionCreatedAt time.Time
}
type DeleteResponse struct {
@@ -62,11 +69,3 @@ type IdentitiesRequest struct {
type IdRequest struct {
UserId int `valid:"required"`
}
type Role struct {
Id int
Name string
Description string
CreatedAt time.Time
UpdatedAt time.Time
}