mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Add model for AdminUser
This commit is contained in:
parent
d0d4b151dc
commit
304732bdad
25
backend/src/graphql/model/AdminUser.ts
Normal file
25
backend/src/graphql/model/AdminUser.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { User } from "@entity/User"
|
||||
import { Field, Int, ObjectType } from "type-graphql"
|
||||
|
||||
@ObjectType()
|
||||
export class AdminUser {
|
||||
constructor(user: User) {
|
||||
this.firstName = user.firstName
|
||||
this.lastName = user.lastName
|
||||
}
|
||||
|
||||
@Field(() => String)
|
||||
firstName: string
|
||||
|
||||
@Field(() => String)
|
||||
lastName: string
|
||||
}
|
||||
|
||||
@ObjectType()
|
||||
export class SearchAdminUsersResult {
|
||||
@Field(() => Int)
|
||||
userCount: number
|
||||
|
||||
@Field(() => [AdminUser])
|
||||
userList: AdminUser[]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user