import { InputType, Field } from '@nestjs/graphql';
import { ActivityType } from '../types/activity.type';
import GraphQLJSON from 'graphql-type-json';

@InputType()
export class CreateActivityInput {
  @Field()
  childId: string;

  @Field(() => ActivityType)
  type: ActivityType;

  @Field()
  startedAt: Date;

  @Field({ nullable: true })
  endedAt?: Date;

  @Field({ nullable: true })
  notes?: string;

  @Field(() => GraphQLJSON, { nullable: true })
  metadata?: any;
}

@InputType()
export class UpdateActivityInput {
  @Field({ nullable: true })
  type?: ActivityType;

  @Field({ nullable: true })
  startedAt?: Date;

  @Field({ nullable: true })
  endedAt?: Date;

  @Field({ nullable: true })
  notes?: string;

  @Field(() => GraphQLJSON, { nullable: true })
  metadata?: any;
}
