import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'

import { ProcessGroup } from './process-group'

@InputType()
export class NewProcessGroup {
  @Field()
  name: string

  @Field({ nullable: true })
  description?: string
}

@InputType()
export class ProcessGroupPatch {
  @Field({ nullable: true })
  name: string

  @Field({ nullable: true })
  description?: string
}

@ObjectType()
export class ProcessGroupList {
  @Field(type => [ProcessGroup])
  items: ProcessGroup[]

  @Field(type => Int)
  total: number
}
