einhornimmond 987582c3ef Revert "use root biome config for backend, add useImportType rule"
This reverts commit bb8132791557fb9dcbf117ff7c3622a83e2e3730.
2025-04-30 09:29:09 +02:00

30 lines
576 B
TypeScript

import { User } from 'database'
import { Field, Int, ObjectType } from 'type-graphql'
@ObjectType()
export class AdminUser {
constructor(user: User) {
this.firstName = user.firstName
this.lastName = user.lastName
this.role = user.userRoles.length > 0 ? user.userRoles[0].role : ''
}
@Field(() => String)
firstName: string
@Field(() => String)
lastName: string
@Field(() => String)
role: string
}
@ObjectType()
export class SearchAdminUsersResult {
@Field(() => Int)
userCount: number
@Field(() => [AdminUser])
userList: AdminUser[]
}