mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
21 lines
478 B
TypeScript
21 lines
478 B
TypeScript
import { Field, ObjectType } from 'type-graphql'
|
|
|
|
import { SpacesResponse } from '@/apis/humhub/model/SpacesResponse'
|
|
|
|
import { Pagination } from './Pagination'
|
|
import { Space } from './Space'
|
|
|
|
@ObjectType()
|
|
export class SpaceList {
|
|
@Field(() => Pagination)
|
|
pagination: Pagination
|
|
|
|
@Field(() => [Space])
|
|
results: Space[]
|
|
|
|
constructor(data: SpacesResponse) {
|
|
this.pagination = new Pagination(data.total, data.page, data.pages)
|
|
this.results = data.results
|
|
}
|
|
}
|