import { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'
import { ScalarObject } from '@things-factory/shell'

import { EvaluationStatus } from './evaluation-status'

@InputType()
export class NewEvaluationStatus {
  @Field()
  type: string
  @Field()
  done: boolean
}

@InputType()
export class EvaluationStatusPatch {
  @Field()
  type: string
  @Field()
  done: boolean
  @Field(type => ScalarObject, { nullable: true })
  result?: any
}

@ObjectType()
export class EvaluationStatusList {
  @Field(type => [EvaluationStatus])
  items: EvaluationStatus[]

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